Commit 82352c08 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

Qml Designer: fixes crashbug

parent 2e5ce0ae
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment