diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-02-29 15:00:09 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-03-04 23:10:26 +0000 |
commit | 601e28b6289a7965c79e0e014d710913c20a91d7 (patch) | |
tree | 3cf042630df2a987a7c901f1c753c0f55c397daf /src | |
parent | 998036e9de667ae7b456c96855af4e542738e33c (diff) |
Let QQmlObjectCreator::setPropertyBinding return false for invalid types
This in theory happen for attached property types.
Fixes Coverity CID 154272.
Change-Id: I113797dea8949877cbeac82bae57655170878d4c
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 21e6d5f6de..15c38c1d5b 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -710,6 +710,8 @@ bool QQmlObjectCreator::setPropertyBinding(const QQmlPropertyData *property, con QQmlTypeNameCache::Result res = context->imports->query(stringAt(binding->propertyNameIndex)); if (res.isValid()) attachedType = res.type; + else + return false; } const int id = attachedType->attachedPropertiesId(QQmlEnginePrivate::get(engine)); QObject *qmlObject = qmlAttachedPropertiesObjectById(id, _qobject); |