Fix crash with some hidden regions after previous commit
authorJulian Eisel <eiseljulian@gmail.com>
Wed, 15 Jan 2020 14:19:35 +0000 (15:19 +0100)
committerJulian Eisel <eiseljulian@gmail.com>
Wed, 15 Jan 2020 14:24:43 +0000 (15:24 +0100)
E.g. in the default "Animation" workspace this would crash.

source/blender/editors/screen/area.c

index a4318db0cb5ea6b073696078bb3e39dbf3842043..f4d9c353102c416ec85996b822da13034f47cef8 100644 (file)
@@ -1497,9 +1497,11 @@ static void region_rect_recursive(
       default:
         /* prevent winrct to be valid */
         ar->winrct.xmax = ar->winrct.xmin;
-        BLI_rcti_sanitize(&ar->winrct);
         break;
     }
+
+    /* Size on one axis is now 0, the other axis may still be invalid (negative) though. */
+    BLI_rcti_sanitize(&ar->winrct);
   }
 
   /* restore prev-split exception */