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:
Diffstat (limited to 'source/blender/python/api2_2x/Texture.c')
-rw-r--r--source/blender/python/api2_2x/Texture.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Texture.c b/source/blender/python/api2_2x/Texture.c
index d1636c3d405..607ff6fe008 100644
--- a/source/blender/python/api2_2x/Texture.c
+++ b/source/blender/python/api2_2x/Texture.c
@@ -947,11 +947,12 @@ static PyObject *M_Texture_Get( PyObject * self, PyObject * args )
while( tex_iter ) {
pyobj = Texture_CreatePyObject( tex_iter );
- if( !pyobj )
+ if( !pyobj ) {
+ Py_DECREF(tex_pylist);
return EXPP_ReturnPyObjError
( PyExc_MemoryError,
"couldn't create Texture PyObject" );
-
+ }
PyList_SET_ITEM( tex_pylist, index, pyobj );
tex_iter = tex_iter->id.next;