Merge branch 'blender-v2.91-release'

This commit is contained in:
Robert Guetzkow 2020-11-16 13:23:59 +01:00
commit 62c4d0419c
1 changed files with 6 additions and 1 deletions

View File

@ -357,7 +357,12 @@ void *BLI_gzopen(const char *filename, const char *mode)
/* xxx Creates file before transcribing the path */
if (mode[0] == 'w') {
fclose(ufopen(filename, "a"));
FILE *file = ufopen(filename, "a");
if (file == NULL) {
/* File couldn't be opened, e.g. due to permission error. */
return NULL;
}
fclose(file);
}
/* temporary #if until we update all libraries to 1.2.7