diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-10 13:31:27 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-10 13:33:18 +0300 |
commit | 39b1842335c8ed949b776993686fb27f090655e5 (patch) | |
tree | b6a5250c431268ee110be17fbcf96a49dae0a461 /source/blender/windowmanager/intern/wm_window.c | |
parent | e4ce5fd8d2e8d38ebdac5b1caf779a3c1dedfd52 (diff) |
Fix T55882: crash closing user preferences window in some cases.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 4f86d05d515..fcd74f32bde 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -182,11 +182,11 @@ static void wm_window_check_position(rcti *rect) static void wm_ghostwindow_destroy(wmWindowManager *wm, wmWindow *win) { if (win->ghostwin) { - if (win == wm->windrawable) { - /* Prevents non-drawable state of main windows (bugs #22967, - * #25071 and possibly #22477 too). */ - wm_window_clear_drawable(wm); - } + /* Prevents non-drawable state of main windows (bugs #22967, + * #25071 and possibly #22477 too). Always clear it even if + * this window was not the drawable one, because we mess with + * drawing context to discard the GW context. */ + wm_window_clear_drawable(wm); if (win == wm->winactive) { wm->winactive = NULL; |