diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 8b7780bebdb..a03f2c22055 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1020,6 +1020,10 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr wm_event_do_handlers(C); wm_event_do_notifiers(C); wm_draw_update(C); + + /* Warning! code above nulls 'C->wm.window', causing BGE to quit, see: T45699. + * Further, its easier to match behavior across platforms, so restore the window. */ + CTX_wm_window_set(C, win); #endif } }