Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-05-17 08:15:35 +0300
committerCampbell Barton <campbell@blender.org>2022-05-24 03:59:48 +0300
commitd55e1caa75c97ad6f77f17202ca6a7fa0623b853 (patch)
treecfed11d1173fa92b61d505d5791f0c1318b1ea82 /source
parentbdab538b3019406cfbd53d99bc40c4dbae27393c (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 1648bdfb9d4..c806472103d 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -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;
}
}