From 5029b97d0240a2b59914812fe004b14b26f8fc34 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 15 Mar 2020 21:53:20 +1100 Subject: 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. --- source/blender/makesrna/intern/makesrna.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '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); } -- cgit v1.2.3