summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2020-07-23 11:55:59 +0300
committerTomi Korpipaa <tomi.korpipaa@qt.io>2020-08-12 08:02:10 +0300
commit437efa699aa6ff566ff19737546dd19cfc93b989 (patch)
tree3a43a02c933d07449f1dd134b6f4f824ef52bb6d /src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
parentd9b34b28839c6749c87416caf4944464dc9d716d (diff)
Prevent crash if duplicating a slide with actions
Fixes: QT3DS-4148 Change-Id: I48f22ba34aab42aa9d42d7b6b57ff8fe7a2e38d6 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp')
-rw-r--r--src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
index 202736d8..707fab50 100644
--- a/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/DocumentEditor.cpp
@@ -3666,7 +3666,8 @@ public:
for (size_t idx = 0, end = slideInstances.size(); idx < end; ++idx) {
TInstanceHandle theInstance(slideInstances[idx]);
if (m_SlideSystem.GetApplicableSlide(theInstance)
- != m_SlideSystem.GetMasterSlide(theInstance)) {
+ != m_SlideSystem.GetMasterSlide(theInstance)
+ && !m_Bridge.GetName(theInstance).IsEmpty()) {
SetName(theInstance, m_Bridge.GetName(theInstance), true);
}
}