[Bf-blender-cvs] [7307f3b] master: Fix T43706: Creating a directory in the file browser (by typing it in the file path) crashes Blender

Sergey Sharybin noreply at git.blender.org
Tue Feb 17 11:55:28 CET 2015


Commit: 7307f3b48564191dfcf2ccd71e730c41c6486289
Author: Sergey Sharybin
Date:   Tue Feb 17 15:50:12 2015 +0500
Branches: master
https://developer.blender.org/rB7307f3b48564191dfcf2ccd71e730c41c6486289

Fix T43706: Creating a directory in the file browser (by typing it in the file path) crashes Blender

Issue was caused by 2e9105c, free() does nothing if pointer is NULL, but guarded
allocator expects you to not free NULL.

===================================================================

M	source/blender/blenlib/intern/storage.c

===================================================================

diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index 90c4ac3..c6b6517 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -459,7 +459,9 @@ void BLI_filelist_free(struct direntry *filelist, unsigned int nrentries, void (
 			free_poin(entry->poin);
 	}
 
-	MEM_freeN(filelist);
+	if (filelist != NULL) {
+		MEM_freeN(filelist);
+	}
 }




More information about the Bf-blender-cvs mailing list