From 66506085b92b2c7a5947c35e7bb38a0fb222290c Mon Sep 17 00:00:00 2001 From: Jere Tuliniemi Date: Tue, 4 Dec 2018 15:58:57 +0200 Subject: Fix crash when undoing material type change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Undoing a change from basic material to animatable material would crash because property wouldn't actually exist anymore. Task-number: QT3DS-2823 Change-Id: Iebb197ba2c26728d82af2c2c6a4458cb9baaaa87 Reviewed-by: Mahmoud Badri Reviewed-by: Antti Määttä --- src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp index 33ca1461..03d5c060 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp @@ -1203,6 +1203,9 @@ void InspectorControlModel::updatePropertyValue(InspectorControlBase *element) c return; propertySystem->GetInstancePropertyValue(instance, element->m_property, value); + if (value.getType() == qt3dsdm::DataModelDataType::None) + return; + const auto metaDataProvider = doc->GetStudioSystem()->GetActionMetaData(); const auto info = metaDataProvider->GetMetaDataPropertyInfo( metaDataProvider->GetMetaDataProperty(instance, element->m_property)); -- cgit v1.2.3