From d74e68bc3cbd3403d6de79a0b3c580c329ca7212 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 7 Jun 2019 13:46:21 +0200 Subject: [PATCH] QmlDesigner: Fix soft assert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The node can acutally be invalid. Change-Id: I18430a538ce947c724ddca85e9fc5e40175019d4 Reviewed-by: Tim Jenssen Reviewed-by: Henning Gründl --- .../components/propertyeditor/propertyeditorqmlbackend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 40c5cfda6e9..39baecbaadd 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -481,7 +481,9 @@ static NodeMetaInfo findCommonSuperClass(const NodeMetaInfo &first, const NodeMe NodeMetaInfo PropertyEditorQmlBackend::findCommonAncestor(const ModelNode &node) { - QTC_ASSERT(node.isValid(), return {}); + if (!node.isValid()) + return {}; + QTC_ASSERT(node.metaInfo().isValid(), return {}); AbstractView *view = node.view();