Fix T96140: Crash on color button drag & drop

Use-after-free in context store, which wasn't cleared correctly after
setting and querying.
This commit is contained in:
Julian Eisel 2022-03-03 12:44:17 +01:00
parent 2d24ba0210
commit 9b12889a1a
Notes: blender-bot 2023-02-14 05:12:59 +01:00
Referenced by issue #96140, Dragging  & Drop color (fields) let's blender crash.
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}