Fix possible crash with an empty handle
authorAaron Kennedy <aaron.kennedy@nokia.com>
Fri, 7 Oct 2011 04:14:27 +0000 (14:14 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 7 Oct 2011 05:07:33 +0000 (07:07 +0200)
Change-Id: I729c919692c65c0ab4272368b7c98101ef573545
Reviewed-on: http://codereview.qt-project.org/6204
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
src/declarative/qml/qdeclarativeproperty.cpp

index 6e5e712..78c37de 100644 (file)
@@ -1297,7 +1297,7 @@ bool QDeclarativePropertyPrivate::writeBinding(const QDeclarativeProperty &that,
         } \
 
 
-    if (object && pp->valueType.valueTypeCoreIdx == -1) {
+    if (!isUndefined && object && pp->valueType.valueTypeCoreIdx == -1) {
         switch (type) {
         case QMetaType::Int:
             if (result->IsInt32())