diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-09 22:22:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-09 22:22:57 +0300 |
commit | 52b1c3764595c87506d1a164c46bf83773549cd6 (patch) | |
tree | 76cb4f0a427bd56b9af5dda06de108deed7ba830 /source/blender/python/intern/bpy_rna.c | |
parent | f577c4bb7f3f69027d0fbc638f13a2c337fbdc2d (diff) |
[#21039] OBJ import Clamp Scale limited to .01 as lowest Value. Used to be Zero
[#21053] 2.5alpha0 export obj problem
+ some minor changes.
Diffstat (limited to 'source/blender/python/intern/bpy_rna.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index fde805f94ee..04d29d40ca6 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -2599,7 +2599,7 @@ PyObject *pyrna_prop_iter(BPy_PropertyRNA *self) { /* Try get values from a collection */ PyObject *ret; - PyObject *iter; + PyObject *iter= NULL; if(RNA_property_array_check(&self->ptr, self->prop)) { int len= pyrna_prop_array_length(self); @@ -2614,9 +2614,13 @@ PyObject *pyrna_prop_iter(BPy_PropertyRNA *self) } - /* we know this is a list so no need to PyIter_Check */ - iter = PyObject_GetIter(ret); - Py_DECREF(ret); + /* we know this is a list so no need to PyIter_Check + * otherwise it could be NULL (unlikely) if conversion failed */ + if(ret) { + iter = PyObject_GetIter(ret); + Py_DECREF(ret); + } + return iter; } |