Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-03-15 13:53:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-15 13:53:20 +0300
commit5029b97d0240a2b59914812fe004b14b26f8fc34 (patch)
tree083b38e75406eb5714678ab8af7fefb932a64446 /source/blender/makesrna/intern/makesrna.c
parentecfb89280ed9d047783f5ff003eec29b02cba9c9 (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/blender/makesrna/intern/makesrna.c')
-rw-r--r--source/blender/makesrna/intern/makesrna.c4
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);
}