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:
authorCampbell Barton <ideasman42@gmail.com>2013-04-04 17:37:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-04 17:37:07 +0400
commit83fff218cca47147183c1177de9db1381cfa48e6 (patch)
tree2576a9f8c61393a346c53eb85077ede1ba2b1d33 /source/blender/python/intern
parent69035e183ba91877489e8aae2d0425b13813ac18 (diff)
parent19dd08a4828ac1883138b2a65f0b8df1498e0d15 (diff)
svn merge ^/trunk/blender -r55700:55776
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_rna.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 735df7aeb10..d6a82ce43ea 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1778,8 +1778,10 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
if (flag & PROP_THICK_WRAP) {
if (value == Py_None)
memset(data, 0, sizeof(PointerRNA));
- else
+ else if (RNA_struct_is_a(param->ptr.type, ptr_type))
*((PointerRNA *)data) = param->ptr;
+ else
+ raise_error = true;
}
else {
/* for function calls, we sometimes want to pass the 'ptr' directly,
@@ -1787,8 +1789,10 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
BLI_assert(value_new == NULL);
if (value == Py_None)
*((void **)data) = NULL;
- else
+ else if (RNA_struct_is_a(param->ptr.type, ptr_type))
*((PointerRNA **)data) = &param->ptr;
+ else
+ raise_error = true;
}
}
else if (value == Py_None) {