diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-01 10:15:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-01 10:17:38 +0300 |
commit | 5709021f52d9bb3eaa5f9fc4c11c6d2d96bb60c9 (patch) | |
tree | 25ef8e7451dba278ec22bfb3a209afcad2c3d6bb /source | |
parent | 5ac9e587d48c2d700c10c4eb31fbdd07c858a414 (diff) |
Correct previous commit, instance should be cleared
Clear instance in case creating creating new instance fails.
In practice this shouldn't happen,
but better not cause further errors if it does.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index b9f80b79dde..e08f1bca10c 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6672,9 +6672,10 @@ PyObject *pyrna_struct_CreatePyObject(PointerRNA *ptr) else { /* Existing users will need to use 'type_recast' method. */ Py_DECREF(pyrna); + *instance = NULL; /* Continue as if no instance was made */ #if 0 /* no need to assign, will be written to next... */ - *instance = pyrna = NULL; + pyrna = NULL; #endif } } |