diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:53:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:53:20 +0300 |
commit | 5029b97d0240a2b59914812fe004b14b26f8fc34 (patch) | |
tree | 083b38e75406eb5714678ab8af7fefb932a64446 /source | |
parent | ecfb89280ed9d047783f5ff003eec29b02cba9c9 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |