diff options
| author | Nicolas Fella <[email protected]> | 2022-03-31 23:24:59 +0200 |
|---|---|---|
| committer | Nicolas Fella <[email protected]> | 2022-03-31 23:24:59 +0200 |
| commit | 1041b52c7a9002d682246052a587e9a17357afa1 (patch) | |
| tree | 74a99612042d33d9d111ab49f0d6ed99b30f3382 | |
| parent | a8966d230c7bdbca269ddc5b6ec1c71d9c8b2e20 (diff) | |
Don't crash when mountpoint is not found
findByPath may return a nullptr, in that case don't access it
BUG: 452100
| -rw-r--r-- | src/userfeedback/placesdatasource.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userfeedback/placesdatasource.cpp b/src/userfeedback/placesdatasource.cpp index 6db89636d..991ce0a18 100644 --- a/src/userfeedback/placesdatasource.cpp +++ b/src/userfeedback/placesdatasource.cpp @@ -45,7 +45,7 @@ QVariant PlacesDataSource::data() auto storageAccess = device.as<Solid::StorageAccess>(); if (storageAccess) { auto mountPoint = KMountPoint::currentMountPoints().findByPath(storageAccess->filePath()); - if (!mountPoint->mountedFrom().startsWith(QLatin1String("kdeconnect@"))) { + if (mountPoint && !mountPoint->mountedFrom().startsWith(QLatin1String("kdeconnect@"))) { hasSSHFS = true; continue; } |
