[Bf-blender-cvs] [9b12889a1a4] master: Fix T96140: Crash on color button drag & drop
Julian Eisel
noreply at git.blender.org
Thu Mar 3 12:55:20 CET 2022
Commit: 9b12889a1a4e6edb595c988168e5c1dff4bf00d9
Author: Julian Eisel
Date: Thu Mar 3 12:44:17 2022 +0100
Branches: master
https://developer.blender.org/rB9b12889a1a4e6edb595c988168e5c1dff4bf00d9
Fix T96140: Crash on color button drag & drop
Use-after-free in context store, which wasn't cleared correctly after
setting and querying.
===================================================================
M source/blender/windowmanager/intern/wm_dragdrop.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list