diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2012-05-08 16:48:30 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-25 08:57:36 +0200 |
commit | 046819ff4d53241d3b22cdb1d4abccad041bee6d (patch) | |
tree | 16014e8651ee6c643fd5674a584073df7b8cb07a /src/qml/qml/qqmlpropertycache.cpp | |
parent | 40bb33103b0ad1b630cbcdb0449a6b8cd88d95df (diff) |
Don't Assert
It's better to have run-time errors in certain uses of the property than
to assert when trying to access it.
Change-Id: I913eea3fe275ee41358ac8d56bd597faf8e613ad
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 87e707d1a0..d922b9942a 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -210,7 +210,8 @@ void QQmlPropertyData::lazyLoad(const QMetaMethod &m) propType = QMetaType::Void; const char *returnType = m.typeName(); - Q_ASSERT(returnType != 0); + if (!returnType) + returnType = "\0"; if ((*returnType != 'v') || (qstrcmp(returnType+1, "oid") != 0)) { propTypeName = returnType; flags |= NotFullyResolved; |