Fix crash flipping region without active area

Would happen when cursor is in-between editors for example.
This commit is contained in:
Julian Eisel 2018-10-28 22:55:21 +01:00
parent 49f6c3556c
commit 05588f909a
1 changed files with 1 additions and 1 deletions

View File

@ -3595,7 +3595,7 @@ static bool region_flip_poll(bContext *C)
ScrArea *area = CTX_wm_area(C);
/* don't flip anything around in topbar */
if (area->spacetype == SPACE_TOPBAR) {
if (area && area->spacetype == SPACE_TOPBAR) {
CTX_wm_operator_poll_msg_set(C, "Flipping regions in the Top-bar is not allowed");
return 0;
}