[Bf-blender-cvs] [5029b97d024] master: Cleanup: add NULL check for RNA filename argument
Campbell Barton
noreply at git.blender.org
Sun Mar 15 12:06:08 CET 2020
Commit: 5029b97d0240a2b59914812fe004b14b26f8fc34
Author: Campbell Barton
Date: Sun Mar 15 21:53:20 2020 +1100
Branches: master
https://developer.blender.org/rB5029b97d0240a2b59914812fe004b14b26f8fc34
Cleanup: add NULL check for RNA filename argument
Currently some of the code supports a NULL filename,
add the NULL check so RNAProcessItem's with a NULL filename
don't crash in the future.
===================================================================
M source/blender/makesrna/intern/makesrna.c
===================================================================
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index af3069cf95e..ae414489f52 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -4347,7 +4347,9 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const
/* include the generated prototypes header */
fprintf(f, "#include \"rna_prototypes_gen.h\"\n\n");
- fprintf(f, "#include \"%s\"\n", filename);
+ if (filename) {
+ fprintf(f, "#include \"%s\"\n", filename);
+ }
if (api_filename) {
fprintf(f, "#include \"%s\"\n", api_filename);
}
More information about the Bf-blender-cvs
mailing list