diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-09-17 09:42:11 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-09-17 11:56:44 +0300 |
commit | 0e275cfee045d8171312689a033520c1b345160a (patch) | |
tree | 9dc6d77c08114f4c01f0873136c85a4c5607790f | |
parent | 15859ecf23f80d51c41e56baf17ef498f89def39 (diff) |
Prevent crash when trying to preload non-existing slide
Change-Id: I342d6a8b5ee85d3836eef1fece0dd87b5efed215
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/runtime/Qt3DSApplication.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/Qt3DSApplication.cpp b/src/runtime/Qt3DSApplication.cpp index 6d88400..cec15d4 100644 --- a/src/runtime/Qt3DSApplication.cpp +++ b/src/runtime/Qt3DSApplication.cpp @@ -1688,6 +1688,10 @@ struct SApp : public IApplication } ISlideSystem &s = presentation->GetSlideSystem(); index = s.FindSlide(*component, qPrintable(slideName)); + if (index == 0xFF) { + qCWarning(WARNING) << "Could not find slide: " << elementPath; + return false; + } return true; } |