Fix crash activating the HUD w/o an active region

This commit is contained in:
Campbell Barton 2018-06-20 11:42:41 +02:00
parent 8b673fc75f
commit edb80a801d
Notes: blender-bot 2023-02-14 05:43:09 +01:00
Referenced by issue #55533, Drag & Drop into UV/Image Editor
1 changed files with 3 additions and 0 deletions

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);
}
/** \} */