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/windowmanager/intern/wm.c')
-rw-r--r--source/blender/windowmanager/intern/wm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index e2b2c17beee..048487fcd68 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -54,6 +54,7 @@
#include "wm.h"
#include "ED_screen.h"
+#include "BPY_extern.h"
#include "RNA_types.h"
@@ -63,6 +64,12 @@
void WM_operator_free(wmOperator *op)
{
+ if(op->py_instance) {
+ /* do this first incase there are any __del__ functions or
+ * similar that use properties */
+ BPY_DECREF(op->py_instance);
+ }
+
if(op->ptr) {
op->properties= op->ptr->data;
MEM_freeN(op->ptr);