From 6b4185cff153619e3f5fe366dbdd8b28e02d2532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Wed, 13 Sep 2017 23:28:37 +0100 Subject: [PATCH] Do not crash when partition has no mount points. --- src/fs/filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs/filesystem.cpp b/src/fs/filesystem.cpp index 23f5dde..40827a1 100644 --- a/src/fs/filesystem.cpp +++ b/src/fs/filesystem.cpp @@ -142,7 +142,7 @@ QString FileSystem::detectMountPoint(FileSystem* fs, const QString& partitionPat mountPoints.append(possibleMountPoints(partitionPath)); - return mountPoints.first(); + return mountPoints.isEmpty() ? QString() : mountPoints.first(); } bool FileSystem::detectMountStatus(FileSystem* fs, const QString& partitionPath)