Fix crash activating the HUD w/o an active region
This commit is contained in:
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
|
@ -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);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue