diff --git a/src/input.cpp b/src/input.cpp index 9ee2faaf6a..ee7cc3223c 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1195,6 +1195,10 @@ class InternalWindowEventFilter : public InputEventFilter return false; } QWindow *internal = static_cast(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(),