[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32019] trunk/blender/source/blender/ blenloader/intern/readfile.c: bugfix [#23849] When the file is opened, Blender 2.5x crushes.
Campbell Barton
ideasman42 at gmail.com
Mon Sep 20 07:46:08 CEST 2010
Revision: 32019
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32019
Author: campbellbarton
Date: 2010-09-20 07:46:07 +0200 (Mon, 20 Sep 2010)
Log Message:
-----------
bugfix [#23849] When the file is opened, Blender 2.5x crushes.
id-property arrays saved in 2.4x would crash on reloading.
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 2010-09-20 05:01:31 UTC (rev 32018)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2010-09-20 05:46:07 UTC (rev 32019)
@@ -1397,6 +1397,14 @@
prop->data.pointer = newdataadr(fd, prop->data.pointer);
array= (IDProperty*) prop->data.pointer;
+
+ /* note!, idp-arrays didn't exist in 2.4x, so the pointer will be cleared
+ * theres not really anything we can do to correct this, at least dont crash */
+ if(array==NULL) {
+ prop->len= 0;
+ prop->totallen= 0;
+ }
+
for(i=0; i<prop->len; i++)
IDP_DirectLinkProperty(&array[i], switch_endian, fd);
More information about the Bf-blender-cvs
mailing list