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
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2022-03-03 14:44:17 +0300
committerJulian Eisel <julian@blender.org>2022-03-03 14:51:44 +0300
commit9b12889a1a4e6edb595c988168e5c1dff4bf00d9 (patch)
tree14e00627681a4f63979a6ba643598a0b0eb69dbb
parent2d24ba0210e35782e4f9a3d9c0b1763384463d32 (diff)
Fix T96140: Crash on color button drag & drop
Use-after-free in context store, which wasn't cleared correctly after setting and querying.
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 4ffb6b90e11..b7c8b29ffb3 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -331,6 +331,7 @@ static wmDropBox *dropbox_active(bContext *C,
const wmOperatorCallContext opcontext = wm_drop_operator_context_get(drop);
if (WM_operator_poll_context(C, drop->ot, opcontext)) {
+ CTX_store_set(C, NULL);
return drop;
}
@@ -346,6 +347,7 @@ static wmDropBox *dropbox_active(bContext *C,
}
}
}
+ CTX_store_set(C, NULL);
return NULL;
}