diff options
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index c8273513711..75293d83346 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1488,8 +1488,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr if(nest != NULL) { len= strlen(nest); - strnest= MEM_mallocN(sizeof(char)*(len+1), "rna_generate_property -> strnest"); - errnest= MEM_mallocN(sizeof(char)*(len+1), "rna_generate_property -> errnest"); + strnest= MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> strnest"); + errnest= MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> errnest"); strcpy(strnest, "_"); strcat(strnest, nest); strcpy(errnest, "."); strcat(errnest, nest); @@ -1713,6 +1713,8 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f) if(func->cont.prev) fprintf(f, "(FunctionRNA*)&rna_%s_%s_func,\n", srna->identifier, ((FunctionRNA*)func->cont.prev)->identifier); else fprintf(f, "NULL,\n"); + fprintf(f, "\tNULL,\n"); + parm= func->cont.properties.first; if(parm) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s_%s, ", srna->identifier, func->identifier, parm->identifier); else fprintf(f, "\t{NULL, "); @@ -1744,6 +1746,8 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f) if(srna->cont.prev) fprintf(f, "(ContainerRNA *)&RNA_%s,\n", ((StructRNA*)srna->cont.prev)->identifier); else fprintf(f, "NULL,\n"); + fprintf(f, "\tNULL,\n"); + prop= srna->cont.properties.first; if(prop) fprintf(f, "\t{(PropertyRNA*)&rna_%s_%s, ", srna->identifier, prop->identifier); else fprintf(f, "\t{NULL, "); |