[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40399] trunk/blender/source/blender/ blenlib/intern/fileops.c: Fix for BLI_ungzip_to_mem: it' ll return NULL now if file is not found.
Sergey Sharybin
g.ulairi at gmail.com
Tue Sep 20 16:49:12 CEST 2011
Revision: 40399
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40399
Author: nazgul
Date: 2011-09-20 14:49:12 +0000 (Tue, 20 Sep 2011)
Log Message:
-----------
Fix for BLI_ungzip_to_mem: it'll return NULL now if file is not found.
It makes default bfont used if unifont isn't found. Useful for install-less
launch when debugging.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/fileops.c
Modified: trunk/blender/source/blender/blenlib/intern/fileops.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/fileops.c 2011-09-20 14:41:01 UTC (rev 40398)
+++ trunk/blender/source/blender/blenlib/intern/fileops.c 2011-09-20 14:49:12 UTC (rev 40399)
@@ -136,7 +136,11 @@
else break;
}
- if(mem && alloc_size!=size)
+ if(size==0) {
+ MEM_freeN(mem);
+ mem= NULL;
+ }
+ else if(alloc_size!=size)
mem= MEM_reallocN(mem, size);
*size_r= size;
More information about the Bf-blender-cvs
mailing list