From c6571f2da1a5df5afe9b451ece87585b0cc90ab3 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 7 Sep 2022 16:23:59 +0200 Subject: Don't assert that a passive grabber is a pointer handler Since 375e4003902e56e1cfd4192cee47566161b7b32d a passive grabber can sometimes be an Item (so far, only Drawer does it). Fixes: QTBUG-106391 Change-Id: I52cd70fda9257acecfc4919ff54179006ff9843b Reviewed-by: Volker Hilsheimer Reviewed-by: Doris Verria (cherry picked from commit 1902912c2a8a0b4080048116403a0bdc70f8772f) Reviewed-by: Qt Cherry-pick Bot --- src/quick/items/qquickitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index c2d16f3133..61effb2756 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -8933,8 +8933,8 @@ void QQuickItemPrivate::localizedTouchEvent(const QTouchEvent *event, bool isFil // So hopefully if we start from one passive grabber and go up the parent chain from there, // we will find any filtering parent items that exist. auto handler = qmlobject_cast(pg.first()); - Q_ASSERT(handler); - pointGrabber = handler->parentItem(); + if (handler) + pointGrabber = handler->parentItem(); } } -- cgit v1.2.3