Fix #104726: Allow loading of 2.48 file without active window #105225

Merged
Harley Acheson merged 2 commits from Harley/blender:Wm248 into main 2023-02-28 17:08:41 +01:00
1 changed files with 8 additions and 0 deletions

View File

@ -501,6 +501,14 @@ void WM_check(bContext *C)
/* Case: no open windows at all, for old file reads. */
wm_window_ghostwindows_ensure(wm);
/* It possible for a pre-250 file to have window but none set active. See #104726. */
if (wm->winactive == NULL) {
wm->winactive = (wmWindow *)wm->windows.first;
if (wm->winactive != NULL) {
wm->winactive->active = true;
}
}
}
/* Case: file-read. */