diff options
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 68079e3e4f4..a2a80683f7f 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -2177,6 +2177,7 @@ static int Object_setDrawMode( BPy_Object * self, PyObject * args ) "expected integer argument" ); value = ( int )PyInt_AS_LONG( integer ); + Py_DECREF( integer ); if( value & ~DTX_MASK ) return EXPP_ReturnIntError( PyExc_ValueError, "undefined bit(s) set in bitfield" ); @@ -3318,6 +3319,7 @@ static int Object_setRBFlags( BPy_Object * self, PyObject * args ) "expected integer argument" ); value = ( int )PyInt_AS_LONG( integer ); + Py_DECREF( integer ); if( value & ~GAMEFLAG_MASK ) return EXPP_ReturnIntError( PyExc_ValueError, "undefined bit(s) set in bitfield" ); @@ -4632,6 +4634,7 @@ static int Object_setProtectFlags( BPy_Object * self, PyObject * args ) "expected integer argument" ); value = ( short )PyInt_AS_LONG( integer ); + Py_DECREF( integer ); if( value & ~PROTFLAGS_MASK ) return EXPP_ReturnIntError( PyExc_ValueError, "undefined bit(s) set in bitfield" ); |