[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30743] trunk/blender/source/blender/ python/intern/bpy_rna.c: [#22617] Using register/ unregister alone crashes blender

Campbell Barton ideasman42 at gmail.com
Mon Jul 26 07:55:57 CEST 2010


Revision: 30743
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30743
Author:   campbellbarton
Date:     2010-07-26 07:55:56 +0200 (Mon, 26 Jul 2010)

Log Message:
-----------
[#22617] Using register/unregister alone crashes blender
wasnt crashing anymore but made exception message clearer.

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	2010-07-26 05:44:34 UTC (rev 30742)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2010-07-26 05:55:56 UTC (rev 30743)
@@ -4235,18 +4235,18 @@
 	}
 
 	if(py_srna==NULL) {
-		 PyErr_Format(PyExc_SystemError, "%.200s internal error, self of type '%.200s' had no bl_rna attribute, should never happen", error_prefix, Py_TYPE(self)->tp_name);
+		 PyErr_Format(PyExc_SystemError, "%.200s, missing bl_rna attribute from '%.200s' instance (may not be registered)", error_prefix, Py_TYPE(self)->tp_name);
 		return NULL;
 	}
 
 	if(!BPy_StructRNA_Check(py_srna)) {
-		 PyErr_Format(PyExc_SystemError, "%.200s internal error, bl_rna was of type '%.200s', instead of %.200s instance", error_prefix, Py_TYPE(py_srna)->tp_name, pyrna_struct_Type.tp_name);
+		 PyErr_Format(PyExc_SystemError, "%.200s, bl_rna attribute wrong type '%.200s' on '%.200s'' instance", error_prefix, Py_TYPE(py_srna)->tp_name, Py_TYPE(self)->tp_name);
 		 Py_DECREF(py_srna);
 		return NULL;
 	}
 
 	if(py_srna->ptr.type != &RNA_Struct) {
-		PyErr_Format(PyExc_SystemError, "%.200s internal error, bl_rna was not a RNA_Struct type of rna struct", error_prefix);
+		PyErr_Format(PyExc_SystemError, "%.200s, bl_rna attribute not a RNA_Struct, on '%.200s'' instance", error_prefix, Py_TYPE(self)->tp_name);
 		 Py_DECREF(py_srna);
 		return NULL;
 	}





More information about the Bf-blender-cvs mailing list