[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14065] trunk/blender/source/blender/ blenloader/intern/readfile.c: quick fix for null check that crashed blender when reading some files.
Campbell Barton
ideasman42 at gmail.com
Wed Mar 12 11:20:45 CET 2008
Revision: 14065
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14065
Author: campbellbarton
Date: 2008-03-12 11:20:45 +0100 (Wed, 12 Mar 2008)
Log Message:
-----------
quick fix for null check that crashed blender when reading some files.
Modified Paths:
--------------
trunk/blender/source/blender/blenloader/intern/readfile.c
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2008-03-12 10:00:52 UTC (rev 14064)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2008-03-12 10:20:45 UTC (rev 14065)
@@ -4384,7 +4384,9 @@
/*link direct data of ID properties*/
if (id->properties) {
id->properties = newdataadr(fd, id->properties);
- IDP_DirectLinkProperty(id->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ if (id->properties) { /* this case means the data was written incorrectly, it should not happen */
+ IDP_DirectLinkProperty(id->properties, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
+ }
}
oldnewmap_free_unused(fd->datamap);
More information about the Bf-blender-cvs
mailing list