diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-30 09:41:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-30 09:41:28 +0300 |
commit | f77f8198545ddea23a39686c001821c1a1c59c79 (patch) | |
tree | 7cbc047f7d06417030973ab39f7be9078a5c5096 /source/blender/python | |
parent | dd38a712778e633c48fa71d2d72c8ae69b67af55 (diff) | |
parent | ff6c6f18c1591a213d6dffb266b9f2136ef09c3b (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/generic/idprop_py_api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 4b56d4412e6..4d4d5232800 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -596,15 +596,15 @@ static IDProperty *idp_from_PyMapping(const char *name, PyObject *ob) return prop; } -static IDProperty *idp_from_DatablockPointer(const char *name, PyObject *ob, IDPropertyTemplate *val) +static IDProperty *idp_from_DatablockPointer(const char *name, PyObject *ob) { - pyrna_id_FromPyObject(ob, &val->id); - return IDP_New(IDP_ID, val, name); + IDPropertyTemplate val = {0}; + pyrna_id_FromPyObject(ob, &val.id); + return IDP_New(IDP_ID, &val, name); } static IDProperty *idp_from_PyObject(PyObject *name_obj, PyObject *ob) { - IDPropertyTemplate val = {0}; const char *name = idp_try_read_name(name_obj); if (name == NULL) { return NULL; @@ -626,7 +626,7 @@ static IDProperty *idp_from_PyObject(PyObject *name_obj, PyObject *ob) return idp_from_PySequence(name, ob); } else if (ob == Py_None || pyrna_id_CheckPyObject(ob)) { - return idp_from_DatablockPointer(name, ob, &val); + return idp_from_DatablockPointer(name, ob); } else if (PyMapping_Check(ob)) { return idp_from_PyMapping(name, ob); |