From c9e5a7dba9aef6a17e5d2032d14633468c56c620 Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Mon, 12 Jun 2023 09:36:33 +0200 Subject: [PATCH] Fix QDS crash on calling property count Change-Id: Ibd3492751ac7b01101060e30f385562a6dfe5ba3 Reviewed-by: Marco Bubke --- src/plugins/qmldesigner/designercore/model/internalnode_p.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/internalnode_p.h b/src/plugins/qmldesigner/designercore/model/internalnode_p.h index d82d97251a1..8b3ff86d2bc 100644 --- a/src/plugins/qmldesigner/designercore/model/internalnode_p.h +++ b/src/plugins/qmldesigner/designercore/model/internalnode_p.h @@ -108,8 +108,9 @@ public: InternalNodeAbstractProperty::Pointer nodeAbstractProperty(const PropertyName &name) const { auto property = m_namePropertyHash.value(name); - if (property->propertyType() == PropertyType::NodeList - || property->propertyType() == PropertyType::Node) { + if (property + && (property->propertyType() == PropertyType::NodeList + || property->propertyType() == PropertyType::Node)) { return std::static_pointer_cast(property); } return {};