summaryrefslogtreecommitdiffstats
path: root/src/runtime/Qt3DSApplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/Qt3DSApplication.cpp')
-rw-r--r--src/runtime/Qt3DSApplication.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/Qt3DSApplication.cpp b/src/runtime/Qt3DSApplication.cpp
index 5c6dbb7..db5d359 100644
--- a/src/runtime/Qt3DSApplication.cpp
+++ b/src/runtime/Qt3DSApplication.cpp
@@ -2267,9 +2267,10 @@ bool AssetHandlers::handlePresentation(SApp &app, SAssetValue &asset, bool initI
CFileTools::CombineBaseAndRelative(app.GetProjectDirectory().c_str(),
asset.GetSource(), thePathStr);
- QDir::addSearchPath(QStringLiteral("qt3dstudio"),
- QFileInfo(QString(thePathStr.c_str()))
- .absoluteDir().absolutePath());
+ const QString absPath = QFileInfo(QString(thePathStr.c_str())).absoluteDir().absolutePath();
+ if (!QDir::searchPaths(QStringLiteral("qt3dstudio")).contains(absPath))
+ QDir::addSearchPath(QStringLiteral("qt3dstudio"), absPath);
+
SPresentationAsset &thePresentationAsset
= *asset.getDataPtr<SPresentationAsset>();
eastl::vector<SElementAttributeReference> theUIPReferences;