From 046819ff4d53241d3b22cdb1d4abccad041bee6d Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 8 May 2012 16:48:30 +1000 Subject: 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 Reviewed-by: Andrew Stanley-Jones --- src/qml/qml/qqmlpropertycache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlpropertycache.cpp') 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; -- cgit v1.2.3