[Bf-blender-cvs] [d83a72ec104] blender2.7: Fix crash activating a fullscreened screen

Julian Eisel noreply at git.blender.org
Sat May 4 15:31:57 CEST 2019


Commit: d83a72ec104ce941b8f5a4c4cb63c805917b7efd
Author: Julian Eisel
Date:   Sat May 4 15:12:55 2019 +0200
Branches: blender2.7
https://developer.blender.org/rBd83a72ec104ce941b8f5a4c4cb63c805917b7efd

Fix crash activating a fullscreened screen

Steps to reproduce were:
* Duplicate some area into new window (shift-click corner triangle)
* Make it fullscreen
* Close the window again
* Activate the added screen from the menu (the one without the
  -nonnormal prefix)
-> Crash (you may have to press "Back to Previous" first though)

When activating a screen, code should check if there's a fullscreen
variant of it and activate that instead. From what I can tell that's
what the code tried to do, but incorrectly.

Same issue as T64045, but things are a bit different for 2.7.

===================================================================

M	source/blender/editors/screen/screen_edit.c

===================================================================

diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index f777b42c5bd..3d2a3e395b9 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1195,10 +1195,9 @@ bool ED_screen_set(bContext *C, bScreen *sc)
 		return true;
 	}
 
-	if (ELEM(sc->state, SCREENMAXIMIZED, SCREENFULL)) {
-		/* find associated full */
-		bScreen *sc1;
-		for (sc1 = bmain->screen.first; sc1; sc1 = sc1->id.next) {
+	/* find associated full */
+	for (bScreen *sc1 = bmain->screen.first; sc1; sc1 = sc1->id.next) {
+		if ((sc1 != sc) && ELEM(sc1->state, SCREENMAXIMIZED, SCREENFULL)) {
 			ScrArea *sa = sc1->areabase.first;
 			if (sa->full == sc) {
 				sc = sc1;



More information about the Bf-blender-cvs mailing list