File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -571,6 +571,10 @@ int main(int argc, char ** argv) {
571571    model_ttc = llama_init_ttc.model .get ();
572572    ctx_ttc   = llama_init_ttc.context .get ();
573573
574+     if  (model_ttc == nullptr  || ctx_ttc == nullptr ) {
575+         return  ENOENT;
576+     }
577+ 
574578    const  llama_vocab * vocab = llama_model_get_vocab (model_ttc);
575579
576580    //  TODO: refactor in a common struct
@@ -586,6 +590,10 @@ int main(int argc, char ** argv) {
586590    model_cts = llama_init_cts.model .get ();
587591    ctx_cts   = llama_init_cts.context .get ();
588592
593+     if  (model_cts == nullptr  || ctx_cts == nullptr ) {
594+         return  ENOENT;
595+     }
596+ 
589597    std::vector<common_sampler *> smpl (n_parallel);
590598    for  (int  i = 0 ; i < n_parallel; ++i) {
591599        params.sampling .no_perf  = (i != 0 );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments