summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Tillmanns <marcus.tillmanns@qt.io>2023-01-20 14:54:13 +0100
committerMarcus Tillmanns <marcus.tillmanns@qt.io>2023-01-23 07:46:35 +0000
commit0c9d5903eff1f9c1dd20e076602e2826ec10031b (patch)
tree8ec86691ac2fad10737107f53377c12390cbb1b6
parent2d491591e2e7b757ffa5cfcb597eb34960885042 (diff)
downloadqt-creator-0c9d5903eff1f9c1dd20e076602e2826ec10031b.tar.gz
Utils: Fix crash in fsengine test
Change-Id: I6a28dfc907d34f1a6e20bc92f5cc506b308f1c0b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--src/libs/utils/filepath.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp
index f2b3f2a19a..4bdf44f036 100644
--- a/src/libs/utils/filepath.cpp
+++ b/src/libs/utils/filepath.cpp
@@ -828,6 +828,10 @@ DeviceFileAccess *FilePath::fileAccess() const
bool FilePath::hasFileAccess() const
{
+ // Happens during startup and in tst_fsengine
+ if (!s_deviceHooks.fileAccess)
+ return false;
+
DeviceFileAccess *access = s_deviceHooks.fileAccess(*this);
return access;
}