diff options
author | Filipe Azevedo <filipe.azevedo@kdab.com> | 2016-08-05 13:18:44 +0200 |
---|---|---|
committer | Filipe Azevedo <filipe.azevedo@kdab.com> | 2016-08-05 11:36:04 +0000 |
commit | 837c5d6284eeec8adb9b2caa3a0ce82b0da019a1 (patch) | |
tree | 9a10c4609896978a027ca12c1322757ee7356308 /src | |
parent | 7377e8f950d550d8823914588c35e541c48ab3ce (diff) |
Fix crash when cache property can not be found
For some reason if a cache property is not found
this cause an application crash instead of just reporting an error.
Now instead of a crash we get this kind of error visible:
qrc:///the_file.qml line 64 column 30: Cannot assign object to property
Change-Id: Ic420713df30603f1d164da439cba30a18af8f2bc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/compiler/qqmltypecompiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index 7e4ee344ff..82332dfc35 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -1414,7 +1414,7 @@ void QQmlComponentAndAliasResolver::findAndRegisterImplicitComponents(const QmlI continue; QQmlPropertyCache *pc = enginePrivate->rawPropertyCacheForType(pd->propType); - const QMetaObject *mo = pc->firstCppMetaObject(); + const QMetaObject *mo = pc ? pc->firstCppMetaObject() : 0; while (mo) { if (mo == &QQmlComponent::staticMetaObject) break; |