summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-02-27 15:18:42 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-28 13:50:46 +0000
commit3b9b908b4211465b2594bd9a0f3923ac949e70c8 (patch)
treea704df6300593c60fea205eda441e2168f3df6bf
parent4371cb583457e5dbcdd93183ff82886dfefdfce6 (diff)
QQuickDeliveryAgent: Do not send hover to deleted item
Change-Id: I58fff14184abc9dcffb3992a473fd2a1ef8446c7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 503bfae6ef76c18e1596cd872c0f6dd0838bbc51) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/util/qquickdeliveryagent.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/util/qquickdeliveryagent.cpp b/src/quick/util/qquickdeliveryagent.cpp
index dbe14826db..91d42412fb 100644
--- a/src/quick/util/qquickdeliveryagent.cpp
+++ b/src/quick/util/qquickdeliveryagent.cpp
@@ -979,7 +979,8 @@ bool QQuickDeliveryAgentPrivate::deliverHoverEvent(QQuickItem *item, const QPoin
// Leaving from previous hovered items until we reach the item or one of its ancestors.
while (!hoverItems.isEmpty() && !itemsToHover.contains(hoverItems.at(0))) {
QQuickItem *hoverLeaveItem = hoverItems.takeFirst();
- sendHoverEvent(QEvent::HoverLeave, hoverLeaveItem, scenePos, lastScenePos, modifiers, timestamp, accepted);
+ if (hoverLeaveItem)
+ sendHoverEvent(QEvent::HoverLeave, hoverLeaveItem, scenePos, lastScenePos, modifiers, timestamp, accepted);
}
if (!hoverItems.isEmpty() && hoverItems.at(0) == item) {//Not entering a new Item