From e94c97c599ced4ca36361d8ff5ad18417d716d56 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 8 Sep 2022 17:21:10 +0200 Subject: Qml: Don't crash on bad grouped properties Fixes: QTBUG-106457 Change-Id: Id36b54fd3ed413c0ac49e33e5ea87984d5220aef Reviewed-by: Volker Hilsheimer (cherry picked from commit e061c934d5a6d93493ba2be7b61efdd055d1e164) Reviewed-by: Fabian Kosmale --- src/qml/qml/qqmlpropertycachecreator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml') diff --git a/src/qml/qml/qqmlpropertycachecreator.cpp b/src/qml/qml/qqmlpropertycachecreator.cpp index a5cf194c36..b5889ca625 100644 --- a/src/qml/qml/qqmlpropertycachecreator.cpp +++ b/src/qml/qml/qqmlpropertycachecreator.cpp @@ -115,8 +115,10 @@ bool QQmlBindingInstantiationContext::resolveInstantiatingProperty() return true; } + if (!referencingObjectPropertyCache) + return false; + Q_ASSERT(referencingObjectIndex >= 0); - Q_ASSERT(referencingObjectPropertyCache); Q_ASSERT(instantiatingBinding->propertyNameIndex != 0); bool notInRevision = false; -- cgit v1.2.3