summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Project/ProjectView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Studio/Palettes/Project/ProjectView.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Project/ProjectView.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Authoring/Studio/Palettes/Project/ProjectView.cpp b/src/Authoring/Studio/Palettes/Project/ProjectView.cpp
index 8bcf93f4..eff2334a 100644
--- a/src/Authoring/Studio/Palettes/Project/ProjectView.cpp
+++ b/src/Authoring/Studio/Palettes/Project/ProjectView.cpp
@@ -372,9 +372,13 @@ bool ProjectView::isQmlStream(int row) const
return false;
QQmlApplicationEngine qmlEngine(filePath);
- const char *rootClassName = qmlEngine.rootObjects().at(0)
- ->metaObject()->superClass()->className();
- return strcmp(rootClassName, "Q3DStudio::Q3DSQmlBehavior") != 0;
+ if (qmlEngine.rootObjects().size() > 0) {
+ const char *rootClassName = qmlEngine.rootObjects().at(0)
+ ->metaObject()->superClass()->className();
+ return strcmp(rootClassName, "Q3DStudio::Q3DSQmlBehavior") != 0;
+ } else {
+ return false;
+ }
}
bool ProjectView::isMaterialFolder(int row) const