HEX
Server: Apache/2.4.41 (FreeBSD) OpenSSL/1.0.2s mod_fcgid/2.3.9
System: FreeBSD salazo 12.0-RELEASE-p1303-ZFS hostBSD 12.0-RELEASE-p1303-ZFS DMR amd64
User: admin (1000)
PHP: 7.4.3
Disabled: NONE
Upload Files
File: /usr/ports/astro/qmapshack/files/patch-src_qmapshack_device_CDeviceWatcherLinux.cpp
--- src/qmapshack/device/CDeviceWatcherLinux.cpp.orig	2021-05-24 09:18:08 UTC
+++ src/qmapshack/device/CDeviceWatcherLinux.cpp
@@ -58,6 +58,10 @@ void CDeviceWatcherLinux::slotDeviceAdded(const QDBusO
     // create path of to drive the block device belongs to
     QDBusInterface* blockIface = new QDBusInterface("org.freedesktop.UDisks2", path.path(), "org.freedesktop.UDisks2.Block", QDBusConnection::systemBus(), this);
     QDBusObjectPath drive_object = blockIface->property("Drive").value<QDBusObjectPath>();
+    if(drive_object.path() == nullptr)
+    {
+        return;
+    }
     QString idLabel = blockIface->property("IdLabel").toString().toUpper();
 
     // read vendor string attached to drive