diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-05-04 16:27:31 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-05-04 16:33:02 +0300 |
commit | 94a064c0e95871cd23fd6208f56f4e016a418327 (patch) | |
tree | b8977c1f69af1c16502755d39102e4c2e228eec1 /source/blender/editors | |
parent | aa8e3e6fbe4af697622def5fc7931ba54f6bbb4e (diff) |
Fix T64045: Crash activating fullscreen workspace
See d83a72ec104ce9.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 12 | ||||
-rw-r--r-- | source/blender/editors/screen/workspace_edit.c | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 2ce9d732eb7..07a87982890 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -884,9 +884,11 @@ static bScreen *screen_fullscreen_find_associated_normal_screen(const Main *bmai { for (bScreen *screen_iter = bmain->screens.first; screen_iter; screen_iter = screen_iter->id.next) { - ScrArea *sa = screen_iter->areabase.first; - if (sa && sa->full == screen) { - return screen_iter; + if ((screen_iter != screen) && ELEM(screen_iter->state, SCREENMAXIMIZED, SCREENFULL)) { + ScrArea *sa = screen_iter->areabase.first; + if (sa && sa->full == screen) { + return screen_iter; + } } } @@ -905,9 +907,7 @@ bScreen *screen_change_prepare( return NULL; } - if (ELEM(screen_new->state, SCREENMAXIMIZED, SCREENFULL)) { - screen_new = screen_fullscreen_find_associated_normal_screen(bmain, screen_new); - } + screen_new = screen_fullscreen_find_associated_normal_screen(bmain, screen_new); /* check for valid winid */ if (!(screen_new->winid == 0 || screen_new->winid == win->winid)) { diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c index 6294a64af0f..2dfa05cf6b0 100644 --- a/source/blender/editors/screen/workspace_edit.c +++ b/source/blender/editors/screen/workspace_edit.c @@ -165,7 +165,9 @@ bool ED_workspace_change(WorkSpace *workspace_new, bContext *C, wmWindowManager } screen_new = screen_change_prepare(screen_old, screen_new, bmain, C, win); - BLI_assert(BKE_workspace_layout_screen_get(layout_new) == screen_new); + if (BKE_workspace_layout_screen_get(layout_new) != screen_new) { + layout_new = BKE_workspace_layout_find(workspace_new, screen_new); + } if (screen_new == NULL) { return false; |