diff options
Diffstat (limited to 'source/blender/python/generic/idprop_py_api.c')
-rw-r--r-- | source/blender/python/generic/idprop_py_api.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index c05c003b176..2fbb6b8ee05 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -756,7 +756,16 @@ static int BPy_IDGroup_Map_SetItem(BPy_IDProperty *self, PyObject *key, PyObject static PyObject *BPy_IDGroup_iter(BPy_IDProperty *self) { - return BPy_IDGroup_ViewKeys_CreatePyObject(self); + PyObject *iterable = BPy_IDGroup_ViewKeys_CreatePyObject(self); + PyObject *ret; + if (iterable) { + ret = PyObject_GetIter(iterable); + Py_DECREF(iterable); + } + else { + ret = NULL; + } + return ret; } PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop) |