input: don't crash if the internal handle is nullptr
Pointer focus can stay on a closed tooltip while focus updates are blocked, so this needs to be checked for BUG: 471285
This commit is contained in:
parent
3698127bc6
commit
4d9a0d2306
1 changed files with 4 additions and 0 deletions
|
@ -1195,6 +1195,10 @@ class InternalWindowEventFilter : public InputEventFilter
|
|||
return false;
|
||||
}
|
||||
QWindow *internal = static_cast<InternalWindow *>(input()->pointer()->focus())->handle();
|
||||
if (!internal) {
|
||||
// the handle can be nullptr if the tooltip gets closed while focus updates are blocked
|
||||
return false;
|
||||
}
|
||||
QMouseEvent mouseEvent(event->type(),
|
||||
event->pos() - internal->position(),
|
||||
event->globalPosition(),
|
||||
|
|
Loading…
Reference in a new issue