From: Kevin Ottens Date: Fri, 15 Sep 2023 07:45:58 +0000 (+0200) Subject: [PATCH] Don't crash if KMountPoint gives nothing back while checking for CIFS X-Git-Tag: archive/raspbian/5.103.0-1+rpi1+deb12u1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b0659229d3a76bb41effd35061f34a837d9da50a;p=kio.git [PATCH] Don't crash if KMountPoint gives nothing back while checking for CIFS BUG: 474451 Gbp-Pq: Name upstream_48322f44_fix_crash_when_kmountpoint_gives_nothing_on_cifs.patch --- diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp index 58017c2..9b4c161 100644 --- a/src/ioslaves/file/file_unix.cpp +++ b/src/ioslaves/file/file_unix.cpp @@ -328,6 +328,9 @@ inline static time_t stat_mtime(const QT_STATBUF &buf) static bool isOnCifsMount(const QString &filePath) { const auto mount = KMountPoint::currentMountPoints().findByPath(filePath); + if (!mount) { + return false; + } return mount->mountType() == QStringLiteral("cifs") || mount->mountType() == QStringLiteral("smb3"); }