Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2019-03-09 14:56:56 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-03-09 15:11:00 +0300
commit7e5d1a9560a5d926381f4aa864623845cdb8f1b2 (patch)
treeba2bc59b14d387c031180972be1bfe4c9ad5f52a /source/blender/editors/screen/screen_edit.c
parent36cd31060b6db6a81668996757bf166cfff38a22 (diff)
Fix T57655: Crash opening 2.79 file saved with maximized area
During screen to workspace/workspace-layout conversion, the first layout of each workspace would be activated. For temporary full-screens, this used to be the full-screen layout (IIRC), apparently it's now the the layout to return to on "Back to Previous". So the 'previous' layout would be activated, not the full-screen one. When actually pressing "Back to Previous" now, the operator would first free the active layout (which it assumes to be the temp full-screen - wrongly in this case) and then try to activate the non-full-screen one, causing use-after-free.
Diffstat (limited to 'source/blender/editors/screen/screen_edit.c')
-rw-r--r--source/blender/editors/screen/screen_edit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 7556a44da1a..502e5a92241 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1154,6 +1154,9 @@ ScrArea *ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *sa, const s
sc = sa->full; /* the old screen to restore */
oldscreen = WM_window_get_active_screen(win); /* the one disappearing */
+ BLI_assert(BKE_workspace_layout_screen_get(layout_old) != sc);
+ BLI_assert(BKE_workspace_layout_screen_get(layout_old)->state != SCREENNORMAL);
+
sc->state = SCREENNORMAL;
sc->flag = oldscreen->flag;