Fix T98185: Assertion saving while fullscreen
When saving from the menu the region was not set, causing the last region in `area->regionbase` to be used as the region was assigned before comparison.
This commit is contained in:
parent
bdab538b30
commit
d55e1caa75
Notes:
blender-bot
2023-02-14 01:07:44 +01:00
Referenced by issue #98185, Assertion saving while fullscreen
|
@ -1960,12 +1960,9 @@ static void wm_handler_op_context_get_if_valid(bContext *C,
|
|||
region = NULL;
|
||||
}
|
||||
|
||||
if (region == NULL) {
|
||||
LISTBASE_FOREACH (ARegion *, region_iter, &area->regionbase) {
|
||||
region = region_iter;
|
||||
if (region == handler->context.region) {
|
||||
break;
|
||||
}
|
||||
if ((region == NULL) && handler->context.region) {
|
||||
if (BLI_findindex(&area->regionbase, handler->context.region) != -1) {
|
||||
region = handler->context.region;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue