From: Debian Qt/KDE Maintainers Date: Wed, 16 Aug 2017 01:09:04 +0000 (+0100) Subject: rebuild-QmlDatapropertyCache-if-deleted X-Git-Tag: archive/raspbian/5.9.1-5+rpi1~2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=35678b7b78ebf79066fa63247c2039201638317e;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);