Fix T68960: Crash loading app-template keymap

This commit is contained in:
Campbell Barton 2020-01-28 16:44:24 +11:00
parent 2e7fd35425
commit 2a39fb1345
1 changed files with 5 additions and 4 deletions

View File

@ -275,6 +275,11 @@ void WM_check(bContext *C)
return;
}
/* Run before loading the keyconfig. */
if (wm->message_bus == NULL) {
wm->message_bus = WM_msgbus_create();
}
if (!G.background) {
/* case: fileread */
if ((wm->initialized & WM_WINDOW_IS_INITIALIZED) == 0) {
@ -286,10 +291,6 @@ void WM_check(bContext *C)
wm_window_ghostwindows_ensure(wm);
}
if (wm->message_bus == NULL) {
wm->message_bus = WM_msgbus_create();
}
/* case: fileread */
/* note: this runs in bg mode to set the screen context cb */
if ((wm->initialized & WM_WINDOW_IS_INITIALIZED) == 0) {