[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34048] trunk/blender/source/blender/ python/intern/bpy_rna.c: fix for crash when some classes didnt register properly ( this included loading sintel.blend).

Campbell Barton ideasman42 at gmail.com
Mon Jan 3 19:15:15 CET 2011


Revision: 34048
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34048
Author:   campbellbarton
Date:     2011-01-03 19:15:15 +0100 (Mon, 03 Jan 2011)

Log Message:
-----------
fix for crash when some classes didnt register properly (this included loading sintel.blend).

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c	2011-01-03 18:14:10 UTC (rev 34047)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2011-01-03 18:15:15 UTC (rev 34048)
@@ -5541,7 +5541,10 @@
 	if(BPy_reports_to_error(&reports, TRUE))
 		return NULL;
 
-	BKE_assert(srna_new != NULL);
+	/* python errors validating are not converted into reports so the check above will fail.
+	 * the cause for returning NULL will be printed as an error */
+	if(srna_new == NULL)
+		return NULL;
 
 	pyrna_subtype_set_rna(py_class, srna_new); /* takes a ref to py_class */
 





More information about the Bf-blender-cvs mailing list