diff --git a/src/input.cpp b/src/input.cpp index c01a06e102..2b008d6fc4 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1238,6 +1238,10 @@ public: 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; + } const QPointF localPos = event->globalPosition() - internal->position(); QWheelEvent wheelEvent(localPos, event->globalPosition(), QPoint(), event->angleDelta() * -1,