diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index fb8101168e2..3346f0607a9 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -164,6 +164,7 @@ void WM_exit(bContext *C) /* modal handlers are on window level freed, others too? */ if(C && C->wm) { for(win= C->wm->windows.first; win; win= win->next) { + ScrArea *sa; ARegion *ar; C->window= win; /* needed by operator close callbacks */ @@ -171,6 +172,12 @@ void WM_exit(bContext *C) for(ar= win->screen->regionbase.first; ar; ar= ar->next) WM_event_remove_handlers(C, &ar->handlers); + + for(sa= win->screen->areabase.first; sa; sa= sa->next) { + WM_event_remove_handlers(C, &sa->handlers); + for(ar= sa->regionbase.first; ar; ar= ar->next) + WM_event_remove_handlers(C, &ar->handlers); + } } } wm_operatortype_free(); |