Fix crash activating the HUD w/o an active region

This commit is contained in:
2018-06-20 11:42:41 +02:00
parent 8b673fc75f
commit edb80a801d

View File

@@ -329,7 +329,10 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *sa)
/* We shouldn't need to do this every time :S */
/* XXX, this is evil! - it also makes the menu show on first draw. :( */
ARegion *ar_prev = CTX_wm_region(C);
CTX_wm_region_set((bContext *)C, ar);
hud_region_layout(C, ar);
CTX_wm_region_set((bContext *)C, ar_prev);
}
/** \} */