From 1041b52c7a9002d682246052a587e9a17357afa1 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Thu, 31 Mar 2022 23:24:59 +0200 Subject: Don't crash when mountpoint is not found findByPath may return a nullptr, in that case don't access it BUG: 452100 --- src/userfeedback/placesdatasource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/userfeedback/placesdatasource.cpp') 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(); 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; } -- cgit v1.3