Fix crash closing File Browser window after closing temporary render window

This seems to be a longer standing issue. Steps to reproduce were:
* With factory settings, Ctrl+O then F12
* Close the render window using the window close button
* Close the File Browser window using the window close button

This could be OS specific though, at least on macOS this caused a crash.
This commit is contained in:
Julian Eisel 2020-12-23 15:31:31 +01:00
parent 21cb288029
commit 5cfda8e7f7
Notes: blender-bot 2023-02-14 05:04:52 +01:00
Referenced by issue #81954, Crash when closing temporary windows
1 changed files with 3 additions and 1 deletions

View File

@ -1142,7 +1142,9 @@ void ED_fileselect_exit(wmWindowManager *wm, Scene *owner_scene, SpaceFile *sfil
return;
}
if (sfile->op) {
wmWindow *temp_win = WM_window_is_temp_screen(wm->winactive) ? wm->winactive : NULL;
wmWindow *temp_win = (wm->winactive && WM_window_is_temp_screen(wm->winactive)) ?
wm->winactive :
NULL;
if (temp_win) {
int win_size[2];
bool is_maximized;