forked from bartvdbraak/blender
-- fixed bug with returning NULL from Object_CreatePyObject() on MacOS/X.
The code prior to the last commit worked... but can't see the differene
This commit is contained in:
parent
621146238c
commit
2de340199d
@ -2590,15 +2590,16 @@ PyObject *Object_CreatePyObject( struct Object * obj )
|
|||||||
BPy_Object *blen_object;
|
BPy_Object *blen_object;
|
||||||
|
|
||||||
if( !obj )
|
if( !obj )
|
||||||
Py_RETURN_NONE;
|
return EXPP_incr_ret( Py_None );
|
||||||
|
|
||||||
blen_object =
|
blen_object =
|
||||||
( BPy_Object * ) PyObject_NEW( BPy_Object, &Object_Type );
|
( BPy_Object * ) PyObject_NEW( BPy_Object, &Object_Type );
|
||||||
|
|
||||||
if( blen_object ) {
|
if( blen_object == NULL ) {
|
||||||
blen_object->object = obj;
|
return ( NULL );
|
||||||
obj->id.us++;
|
|
||||||
}
|
}
|
||||||
|
blen_object->object = obj;
|
||||||
|
obj->id.us++;
|
||||||
return ( ( PyObject * ) blen_object );
|
return ( ( PyObject * ) blen_object );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user