Fix T45699: BGE auto-run exits immediately

This commit is contained in:
Campbell Barton 2015-09-14 23:37:33 +10:00
parent 34843a855e
commit 3056add0e0
Notes: blender-bot 2023-02-14 08:47:34 +01:00
Referenced by issue #46202, Fullscreen crashes Blender on Mac OS X
Referenced by issue #45699, Script autorun closes immediately on Windows
1 changed files with 4 additions and 0 deletions

View File

@ -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
}
}