diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-15 14:52:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-15 14:52:36 +0400 |
commit | daa968df227438ea592fc0702f1e4727dfc9357d (patch) | |
tree | e996f9b6f69740b07cb0b4e05514524236e33ec2 | |
parent | c8618348e0feab2f28d348b539b8a6420301be1f (diff) |
- opening the file selector was freeing a NULL pointer
- some warnings in last commit.
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 6 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 47839ea0342..68eeb8718a2 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -156,8 +156,10 @@ static void file_free(SpaceLink *sl) static void file_init(struct wmWindowManager *wm, ScrArea *sa) { SpaceFile *sfile= (SpaceFile*)sa->spacedata.first; - MEM_freeN(sfile->params); - sfile->params = 0; + if(sfile->params) { + MEM_freeN(sfile->params); + sfile->params = 0; + } printf("file_init\n"); } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 820f96f1e81..c2335bea995 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -1680,6 +1680,7 @@ PyObject *pyrna_prop_iter(BPy_PropertyRNA *self) { /* Try get values from a collection */ PyObject *ret; + PyObject *iter; if(RNA_property_array_check(&self->ptr, self->prop)) { int len = pyrna_prop_array_length(self); @@ -1691,7 +1692,7 @@ PyObject *pyrna_prop_iter(BPy_PropertyRNA *self) PyList_SET_ITEM(ret, i, pyrna_prop_to_py_index(self, i)); } } - else if (ret = pyrna_prop_values(self)) { + else if ((ret = pyrna_prop_values(self))) { /* do nothing */ } else { @@ -1701,7 +1702,7 @@ PyObject *pyrna_prop_iter(BPy_PropertyRNA *self) /* we know this is a list so no need to PyIter_Check */ - PyObject *iter = PyObject_GetIter(ret); + iter = PyObject_GetIter(ret); Py_DECREF(ret); return iter; } |