summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-02-16 14:54:03 +0200
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-02-19 05:25:35 +0000
commit367d2d235809ef453089803cb86994ed34c9c612 (patch)
treefeb9a7dc920d17bf6f0df517c2e1bab71e520e45
parent1fd71e93b47df854f3c550190f2bbbf3969c989d (diff)
Fix crash when undoing element delete
Task-number: QT3DS-1107 Change-Id: I8396036986ff6d3622260fba6ecb9d72c3975abf Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
index d7ecf893..0998d628 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
@@ -238,8 +238,10 @@ void InspectorControlView::onInstancePropertyValueChanged(
// titleChanged implies icon change too, but that will only occur if inspectable type changes,
// which will invalidate the inspectable anyway, so in reality we are only interested in name
// property here
- if (propertyHandle == bridge->GetNameProperty() && m_inspectableBase->IsValid())
+ if (propertyHandle == bridge->GetNameProperty()
+ && m_inspectableBase && m_inspectableBase->IsValid()) {
Q_EMIT titleChanged();
+ }
}
QColor InspectorControlView::titleColor(int instance, int handle) const