XR: Fix crash on executing some action operators
Since the XR area does not have any region geometry, hud updates from operators would cause invalid access when updating region sizes.
This commit is contained in:
@@ -1972,6 +1972,7 @@ void ED_area_init(wmWindowManager *wm, wmWindow *win, ScrArea *area)
|
||||
|
||||
static void area_offscreen_init(ScrArea *area)
|
||||
{
|
||||
area->flag |= AREA_FLAG_OFFSCREEN;
|
||||
area->type = BKE_spacetype_from_id(area->spacetype);
|
||||
|
||||
if (area->type == NULL) {
|
||||
|
||||
@@ -540,6 +540,8 @@ enum {
|
||||
AREA_FLAG_STACKED_FULLSCREEN = (1 << 7),
|
||||
/** Update action zones (even if the mouse is not intersecting them). */
|
||||
AREA_FLAG_ACTIONZONES_UPDATE = (1 << 8),
|
||||
/** For offscreen areas. */
|
||||
AREA_FLAG_OFFSCREEN = (1 << 9),
|
||||
};
|
||||
|
||||
#define AREAGRID 4
|
||||
|
||||
@@ -1063,7 +1063,7 @@ static void wm_operator_finished(bContext *C, wmOperator *op, const bool repeat,
|
||||
if (hud_status != NOP) {
|
||||
if (hud_status == SET) {
|
||||
ScrArea *area = CTX_wm_area(C);
|
||||
if (area) {
|
||||
if (area && ((area->flag & AREA_FLAG_OFFSCREEN) == 0)) {
|
||||
ED_area_type_hud_ensure(C, area);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user