bugfix [#23849] When the file is opened, Blender 2.5x crushes.

id-property arrays saved in 2.4x would crash on reloading.
This commit is contained in:
Campbell Barton
2010-09-20 05:46:07 +00:00
parent 69d72046e2
commit a036626604

View File

@@ -1397,6 +1397,14 @@ static void IDP_DirectLinkIDPArray(IDProperty *prop, int switch_endian, FileData
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);