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:
Diffstat (limited to 'source/blender/python/intern/bpy_rna.c')
-rw-r--r--source/blender/python/intern/bpy_rna.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 819dc3ac495..e5487a6a0c9 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -2029,7 +2029,15 @@ static int pyrna_py_to_prop(
else {
/* data == NULL, assign to RNA */
if (value == Py_None || RNA_struct_is_a(param->ptr.type, ptr_type)) {
- RNA_property_pointer_set(ptr, prop, value == Py_None ? PointerRNA_NULL : param->ptr);
+ ReportList reports;
+ BKE_reports_init(&reports, RPT_STORE);
+ RNA_property_pointer_set(
+ &reports, ptr, prop, value == Py_None ? PointerRNA_NULL : param->ptr);
+ int err = (BPy_reports_to_error(&reports, PyExc_RuntimeError, true));
+ if (err == -1) {
+ Py_XDECREF(value_new);
+ return -1;
+ }
}
else {
raise_error = true;