2.5 internal bugfix: remove modal handlers before exiting the screen,
since these may be using it.
This commit is contained in:
@@ -1321,9 +1321,7 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut
|
||||
|
||||
void ui_popup_block_free(bContext *C, uiPopupBlockHandle *handle)
|
||||
{
|
||||
/* XXX ton added, chrash on load file with popup open... need investigate */
|
||||
if(CTX_wm_screen(C))
|
||||
ui_remove_temporary_region(C, CTX_wm_screen(C), handle->region);
|
||||
ui_remove_temporary_region(C, CTX_wm_screen(C), handle->region);
|
||||
MEM_freeN(handle);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,8 @@ static void wm_window_match_init(bContext *C, ListBase *wmlist)
|
||||
for(win= wm->windows.first; win; win= win->next) {
|
||||
|
||||
CTX_wm_window_set(C, win); /* needed by operator close callbacks */
|
||||
WM_event_remove_handlers(C, &win->handlers);
|
||||
WM_event_remove_handlers(C, &win->modalhandlers);
|
||||
ED_screen_exit(C, win, win->screen);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,6 +230,9 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
|
||||
BLI_remlink(&wm->windows, win);
|
||||
|
||||
wm_draw_window_clear(win);
|
||||
CTX_wm_window_set(C, win); /* needed by handlers */
|
||||
WM_event_remove_handlers(C, &win->handlers);
|
||||
WM_event_remove_handlers(C, &win->modalhandlers);
|
||||
ED_screen_exit(C, win, win->screen);
|
||||
wm_window_free(C, wm, win);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user