Commit 1041b52c authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Don't crash when mountpoint is not found

findByPath may return a nullptr, in that case don't access it

BUG: 452100
parent a8966d23
Pipeline #157447 passed with stage
in 4 minutes and 14 seconds
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment