From d3e1782abc3be15fdc45e5139ebe1e9638d52734 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 9 Jul 2019 15:50:45 -0300 Subject: Fix T66530: set_stereo_3d (pageflip) exists Blender Note: Although this fixes the issue (as in, it prevents a crash) BKE_reports are not working because of CTX_wm_window_set(). Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D5210 --- source/blender/windowmanager/intern/wm_window.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index daa501f55b4..d17b8817691 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -714,8 +714,14 @@ void wm_window_ghostwindows_ensure(wmWindowManager *wm) wm_window_ghostwindow_add(wm, "Blender", win); } - /* happens after fileread */ - wm_window_ensure_eventstate(win); + + if (win->ghostwin != NULL) { + /* If we have no ghostwin this is a buggy window that should be removed. + * However we still need to initialize it correctly so the screen doesn't hang. */ + + /* happens after fileread */ + wm_window_ensure_eventstate(win); + } /* add keymap handlers (1 handler for all keys in map!) */ keymap = WM_keymap_ensure(wm->defaultconf, "Window", 0, 0); -- cgit v1.2.3