Patch #3099 - bugfix for #3097.

a little tweak for arg parsing.

Contributed by Ken Hughes.  Thanks!
This commit is contained in:
Stephen Swaney
2005-09-24 15:28:59 +00:00
parent 0ce3341aaa
commit 94aa843626

View File

@@ -1496,13 +1496,12 @@ static int Texture_setFlags( BPy_Texture * self, PyObject * value )
static int Texture_setImage( BPy_Texture * self, PyObject * value )
{
PyObject *pyimg;
Image *blimg = NULL;
if( !PyArg_ParseTuple( value, "O!", &Image_Type, &pyimg ) )
if( !BPy_Image_Check (value) )
return EXPP_ReturnIntError( PyExc_TypeError,
"expected an Image" );
blimg = Image_FromPyObject( pyimg );
blimg = Image_FromPyObject( value );
if( self->texture->ima ) {
self->texture->ima->id.us--;