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:
authorTon Roosendaal <ton@blender.org>2008-12-08 19:43:19 +0300
committerTon Roosendaal <ton@blender.org>2008-12-08 19:43:19 +0300
commitdc50e7fd3cf2a4305dab14b329fbfb54fbd5e6dc (patch)
treee6e967cff00bada1f33dff17fd1fa2301c8b8cb0 /source/blender/windowmanager
parent02e23c16dd9e403deb1694829c11d16dc47392ee (diff)
2.5
Minor cleanups.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm.c7
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c3
-rw-r--r--source/blender/windowmanager/intern/wm_files.c2
3 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 3333c485aae..9e0408097d9 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -74,11 +74,6 @@ void wm_operator_register(wmWindowManager *wm, wmOperator *op)
{
int tot;
- if(op->ptr) {
- // MEM_freeN(op->ptr);
- // op->ptr= NULL;
- }
-
BLI_addtail(&wm->operators, op);
tot= BLI_countlist(&wm->operators);
@@ -130,7 +125,7 @@ void wm_add_default(bContext *C)
}
-/* context is allowed to be NULL, do net free wm itself (library.c) */
+/* context is allowed to be NULL, do not free wm itself (library.c) */
void wm_close_and_free(bContext *C, wmWindowManager *wm)
{
wmWindow *win;
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index c74497fa10b..1f5ed78ba58 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -310,9 +310,11 @@ int WM_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event)
if((retval & OPERATOR_FINISHED) && (ot->flag & OPTYPE_REGISTER)) {
wm_operator_register(C->wm, op);
+ handler->op= NULL;
}
else if(!(retval & OPERATOR_RUNNING_MODAL)) {
wm_operator_free(op);
+ handler->op= NULL;
}
}
@@ -400,6 +402,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
handler->op= NULL;
}
+
/* remove modal handler, operator itself should have been cancelled and freed */
if(retval & (OPERATOR_CANCELLED|OPERATOR_FINISHED)) {
BLI_remlink(handlers, handler);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index b8a60710063..75306dc75d8 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -872,7 +872,7 @@ int WM_write_homefile(bContext *C, wmOperator *op)
write_flags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_LOCK | G_FILE_SIGN);
BLO_write_file(C, tstr, write_flags, &err);
- return 1;
+ return OPERATOR_FINISHED;
}
void WM_write_autosave(bContext *C)