Prechádzať zdrojové kódy

ncd: NCDInterpProg: fix crash on duplicate process/template name

ambrop7 13 rokov pred
rodič
commit
f2a2b37f1d
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      ncd/NCDInterpProg.c

+ 1 - 1
ncd/NCDInterpProg.c

@@ -83,7 +83,7 @@ int NCDInterpProg_Init (NCDInterpProg *o, NCDProgram *prog, NCDStringIndex *stri
         
         
         NCDInterpProg__HashRef ref = {e, o->num_procs};
         NCDInterpProg__HashRef ref = {e, o->num_procs};
         if (!NCDInterpProg__Hash_Insert(&o->hash, o->procs, ref, NULL)) {
         if (!NCDInterpProg__Hash_Insert(&o->hash, o->procs, ref, NULL)) {
-            BLog(BLOG_ERROR, "duplicate process or template name: %s", e->name);
+            BLog(BLOG_ERROR, "duplicate process or template name: %s", NCDProcess_Name(p));
             NCDInterpProcess_Free(&e->iprocess);
             NCDInterpProcess_Free(&e->iprocess);
             goto fail2;
             goto fail2;
         }
         }