Files
ports/astro/qmapshack/files/patch-src_qmapshack_device_CDeviceWatcherLinux.cpp
T
Muhammad Moinur Rahman 97e8e6433d astro/qmapshack: UNBREAK and Update version 1.13.0=>1.14.0
- Change MASTER_SITES to GITHUB
- Update WWW in pkg-descr
- Fix USES
- Prevent a crash when not getting info on devices back from dbus (this
  happens when an nvme device (nvd*) is installed in the system, bsdisks
  doesn't handle these yet). (already reported upstream).

PR:             241647
Submitted by:   cmt
MFH:		2019Q4 (runtime fix)
Relnotes:       https://github.com/Maproom/qmapshack/releases
2019-11-23 16:25:09 +00:00

14 lines
712 B
C++

--- src/qmapshack/device/CDeviceWatcherLinux.cpp.orig 2019-11-01 16:47:46 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