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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user