Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/python/intern/bpy_rna.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 721c996aca8..e6becc6f6be 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -5541,7 +5541,10 @@ static PyObject *pyrna_basetype_register(PyObject *UNUSED(self), PyObject *py_cl
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 */