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.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user