aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2020-09-04 10:35:25 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2020-09-04 08:40:11 +0000
commit2f77a9bcfca84458dce93c63b0eaae7c3140b075 (patch)
treec58a48602c4e35bc32fdc5f067c2eb9accdac57d
parentf9600b733557b4b29d0ab9f230cc9d87887d3039 (diff)
QmlDesigner: Fix crash
Change-Id: Ibb6a14b4b684482b8c6098933a79929c2bd09add Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
index 2ecb0fa3b2..06b3f48258 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
@@ -334,6 +334,9 @@ static QList<QByteArray> prepareNonMcuProperties()
bool PropertyEditorValue::isAvailable() const
{
+ if (!m_modelNode.isValid())
+ return true;
+
const QList<QByteArray> nonMcuProperties = prepareNonMcuProperties();
const QByteArray fontPrefix = {"font"};