input: don't crash if the internal handle is nullptr (wheelEvent)

Apply the same fix as 4d9a0d23 to wheelEvent

(cherry picked from commit e0b554e67b)
wilder/Plasma/6.2
Alessandro Astone 1 year ago
parent 40cea14dd8
commit 63ec260124
  1. 4
      src/input.cpp

@ -1238,6 +1238,10 @@ public:
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;
}
const QPointF localPos = event->globalPosition() - internal->position();
QWheelEvent wheelEvent(localPos, event->globalPosition(), QPoint(),
event->angleDelta() * -1,

Loading…
Cancel
Save