Revision: 20299
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20299
Author: bdiego
Date: 2009-05-20 17:59:57 +0200 (Wed, 20 May 2009)
Log Message:
-----------
Fix segfault on Outliner.
Try to expand the RNA tree in Outliner -> User Preference crash blender.
RNA_struct_idproperties was not checking if ptr.data is NULL
and always try to access the properties type information.
Note: brecht double check this.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/makesrna/intern/rna_access.c
Modified:
branches/blender2.5/blender/source/blender/makesrna/intern/rna_access.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_access.c
2009-05-20 15:33:28 UTC (rev 20298)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_access.c
2009-05-20 15:59:57 UTC (rev 20299)
@@ -146,11 +146,13 @@
IDProperty *RNA_struct_idproperties(PointerRNA *ptr, int create)
{
- StructRNA *type= ptr->type;
+ StructRNA *type;
- if(type->idproperties)
- return type->idproperties(ptr, create);
-
+ if (ptr->data) {
+ type= ptr->type;
+ if(type->idproperties)
+ return type->idproperties(ptr, create);
+ }
return NULL;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs