From: Debian Qt/KDE Maintainers Date: Thu, 7 Sep 2017 17:01:39 +0000 (+0100) Subject: rebuild-QmlDatapropertyCache-if-deleted X-Git-Tag: archive/raspbian/5.9.1-6+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=04d7ba0ed5c7ea2200b42fa02b7557e9cd9c9f97;p=qtdeclarative-opensource-src.git rebuild-QmlDatapropertyCache-if-deleted Gbp-Pq: Name rebuild-QmlDatapropertyCache-if-deleted.patch --- diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index 62288a584..325f752cd 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -515,7 +515,12 @@ void QQmlBinding::getPropertyData(QQmlPropertyData **propertyData, QQmlPropertyD Q_ASSERT(propertyData); QQmlData *data = QQmlData::get(*m_target, false); - Q_ASSERT(data && data->propertyCache); + Q_ASSERT(data); + + if (Q_UNLIKELY(!data->propertyCache)) { + data->propertyCache = QQmlEnginePrivate::get(context()->engine)->cache(m_target->metaObject()); + data->propertyCache->addref(); + } *propertyData = data->propertyCache->property(m_targetIndex.coreIndex()); Q_ASSERT(*propertyData);