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>
This commit is contained in:
Marcus Tillmanns
2023-01-20 14:54:13 +01:00
parent 2d491591e2
commit 0c9d5903ef

View File

@@ -828,6 +828,10 @@ DeviceFileAccess *FilePath::fileAccess() const
bool FilePath::hasFileAccess() const bool FilePath::hasFileAccess() const
{ {
// Happens during startup and in tst_fsengine
if (!s_deviceHooks.fileAccess)
return false;
DeviceFileAccess *access = s_deviceHooks.fileAccess(*this); DeviceFileAccess *access = s_deviceHooks.fileAccess(*this);
return access; return access;
} }