Fix QDS crash on calling property count

Change-Id: Ibd3492751ac7b01101060e30f385562a6dfe5ba3
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Vikas Pachdha
2023-06-12 09:36:33 +02:00
parent 5de0bd268f
commit c9e5a7dba9

View File

@@ -108,8 +108,9 @@ public:
InternalNodeAbstractProperty::Pointer nodeAbstractProperty(const PropertyName &name) const InternalNodeAbstractProperty::Pointer nodeAbstractProperty(const PropertyName &name) const
{ {
auto property = m_namePropertyHash.value(name); auto property = m_namePropertyHash.value(name);
if (property->propertyType() == PropertyType::NodeList if (property
|| property->propertyType() == PropertyType::Node) { && (property->propertyType() == PropertyType::NodeList
|| property->propertyType() == PropertyType::Node)) {
return std::static_pointer_cast<InternalNodeAbstractProperty>(property); return std::static_pointer_cast<InternalNodeAbstractProperty>(property);
} }
return {}; return {};