aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-04-07 15:22:02 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-04-07 15:22:02 +0300
commit04ea6df18a2b06efd133a4f1b13c2e38817279ae (patch)
tree73b84355c755c6e21f3f66816aeb13e6a16012cd /src/qml/qml/qqmlobjectcreator.cpp
parent4bb06cfba94bcc9ddf30d968a227d00479d475b7 (diff)
parent1089f8f226d546aef3b032a2f4391e08a3afa48d (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.4' into tqtc/lts-5.15-opensourcev5.15.4-lts-lgpl
Diffstat (limited to 'src/qml/qml/qqmlobjectcreator.cpp')
-rw-r--r--src/qml/qml/qqmlobjectcreator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp
index 1c8f2b2091..6aeb567a86 100644
--- a/src/qml/qml/qqmlobjectcreator.cpp
+++ b/src/qml/qml/qqmlobjectcreator.cpp
@@ -679,8 +679,7 @@ void QQmlObjectCreator::setPropertyValue(const QQmlPropertyData *property, const
// otherwise, try a custom type assignment
QString stringValue = compilationUnit->bindingValueAsString(binding);
QQmlMetaType::StringConverter converter = QQmlMetaType::customStringConverter(property->propType());
- Q_ASSERT(converter);
- QVariant value = (*converter)(stringValue);
+ QVariant value = converter ? (*converter)(stringValue) : QVariant();
QMetaProperty metaProperty = _qobject->metaObject()->property(property->coreIndex());
if (value.isNull() || metaProperty.userType() != property->propType()) {