From 82352c081946f65ca527de1dd3ae09e6fd6b9b87 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@nokia.com> Date: Fri, 8 Jan 2010 17:11:39 +0100 Subject: [PATCH] Qml Designer: fixes crashbug --- .../components/propertyeditor/propertyeditorvalue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp index c08b535a2a1..9c6c1984838 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp @@ -58,7 +58,7 @@ PropertyEditorValue::PropertyEditorValue(QObject *parent) QVariant PropertyEditorValue::value() const { QVariant returnValue = m_value; - if (modelNode().metaInfo().isValid() && modelNode().metaInfo().property(name()).isValid()) + if (modelNode().isValid() && modelNode().metaInfo().isValid() && modelNode().metaInfo().property(name()).isValid()) if (modelNode().metaInfo().property(name()).type() == QLatin1String("QUrl")) { returnValue = returnValue.toUrl().toString(); } @@ -137,7 +137,7 @@ bool PropertyEditorValue::isInSubState() const bool PropertyEditorValue::isBound() const { - return modelNode().property(name()).isBindingProperty(); + return modelNode().isValid() && modelNode().property(name()).isValid() && modelNode().property(name()).isBindingProperty(); } void PropertyEditorValue::setIsInSubState(bool isInSubState) -- GitLab