Fix crash changing screen + region overlap fade

This commit is contained in:
Campbell Barton 2015-11-17 10:47:37 +11:00
parent 1cfe2748f4
commit 2ced9326bb
Notes: blender-bot 2023-02-14 08:26:28 +01:00
Referenced by issue #46764, view3d.toolshelf() segmentation fault
1 changed files with 9 additions and 5 deletions

View File

@ -1272,16 +1272,20 @@ void ED_region_exit(bContext *C, ARegion *ar)
CTX_wm_region_set(C, ar);
WM_event_remove_handlers(C, &ar->handlers);
if (ar->swinid)
if (ar->swinid) {
wm_subwindow_close(CTX_wm_window(C), ar->swinid);
ar->swinid = 0;
ar->swinid = 0;
}
if (ar->headerstr)
if (ar->headerstr) {
MEM_freeN(ar->headerstr);
ar->headerstr = NULL;
ar->headerstr = NULL;
}
if (ar->regiontimer)
if (ar->regiontimer) {
WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), ar->regiontimer);
ar->regiontimer = NULL;
}
CTX_wm_region_set(C, prevar);
}