mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Don't crash when mountpoint is not found
findByPath may return a nullptr, in that case don't access it BUG: 452100
This commit is contained in:
parent
a8966d230c
commit
1041b52c7a
|
@ -45,7 +45,7 @@ QVariant PlacesDataSource::data()
|
||||||
auto storageAccess = device.as<Solid::StorageAccess>();
|
auto storageAccess = device.as<Solid::StorageAccess>();
|
||||||
if (storageAccess) {
|
if (storageAccess) {
|
||||||
auto mountPoint = KMountPoint::currentMountPoints().findByPath(storageAccess->filePath());
|
auto mountPoint = KMountPoint::currentMountPoints().findByPath(storageAccess->filePath());
|
||||||
if (!mountPoint->mountedFrom().startsWith(QLatin1String("kdeconnect@"))) {
|
if (mountPoint && !mountPoint->mountedFrom().startsWith(QLatin1String("kdeconnect@"))) {
|
||||||
hasSSHFS = true;
|
hasSSHFS = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue