Cleanup: add NULL check for filename argument which could be NULL

While it's never NULL at the moment, checks elsewhere in this function
support passing in a NULL filename, so keep this working as intended
in case RNAProcessItem.filename is NULL in the future.
This commit is contained in:
Campbell Barton 2021-01-04 15:35:17 +11:00
parent 82bbe257ee
commit 2008c24123
1 changed files with 1 additions and 1 deletions

View File

@ -4436,7 +4436,7 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const
}
}
if (STREQ(filename, "rna_ID.c")) {
if (filename && STREQ(filename, "rna_ID.c")) {
/* this is ugly, but we cannot have c files compiled for both
* makesrna and blender with some build systems at the moment */
fprintf(f, "#include \"rna_define.c\"\n\n");