Fix: potential crash from null pointer dereference
Null check the operator member as this is documented to be null and is checked elsewhere in the handler logic. Co-authored-by: Kabinet0 <m3kabin@gmail.com> Ref !137506
This commit is contained in:
@@ -2552,8 +2552,10 @@ static void wm_handler_operator_insert(wmWindow *win, wmEventHandler_Op *handler
|
||||
LISTBASE_FOREACH (wmEventHandler *, handler_iter, &win->modalhandlers) {
|
||||
if (handler_iter->type == WM_HANDLER_TYPE_OP) {
|
||||
wmEventHandler_Op *handler_iter_op = (wmEventHandler_Op *)handler_iter;
|
||||
if (handler_iter_op->op->type->flag & OPTYPE_MODAL_PRIORITY) {
|
||||
last_priority_handler = handler_iter;
|
||||
if (handler_iter_op->op != nullptr) {
|
||||
if (handler_iter_op->op->type->flag & OPTYPE_MODAL_PRIORITY) {
|
||||
last_priority_handler = handler_iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user