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/NLA.c')
-rw-r--r--source/blender/python/api2_2x/NLA.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/NLA.c b/source/blender/python/api2_2x/NLA.c
index c1ed37bfe43..dd891472155 100644
--- a/source/blender/python/api2_2x/NLA.c
+++ b/source/blender/python/api2_2x/NLA.c
@@ -471,11 +471,15 @@ PyObject *Action_CreatePyObject( struct bAction * act )
{
BPy_Action *blen_action;
+ if(!act)
+ return EXPP_incr_ret(Py_None);
+
blen_action =
( BPy_Action * ) PyObject_NEW( BPy_Action, &Action_Type );
- if( blen_action == NULL ) {
- return ( NULL );
+ if( !blen_action) {
+ return ( EXPP_ReturnPyObjError
+ ( PyExc_RuntimeError, "failure to create object!" ) );
}
blen_action->action = act;
return ( ( PyObject * ) blen_action );