We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb2d54a commit ba8a88aCopy full SHA for ba8a88a
src/modules/upower.cpp
@@ -370,6 +370,8 @@ void UPower::setDisplayDevice() {
370
auto thisPtr{static_cast<UPower *>(user_data)};
371
upDevice.upDevice = static_cast<UpDevice *>(data);
372
thisPtr->getUpDeviceInfo(upDevice);
373
+ if (upDevice.nativePath == nullptr)
374
+ return;
375
if (0 == std::strcmp(upDevice.nativePath, thisPtr->nativePath_.c_str())) {
376
// Unref current upDevice
377
if (thisPtr->upDevice_.upDevice != NULL) g_object_unref(thisPtr->upDevice_.upDevice);
0 commit comments