Merge pull request #3266 from luttermann/master

master
Alexis Rouillard 2024-05-14 09:37:11 +02:00 committed by GitHub
commit 912d0e83f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -370,6 +370,7 @@ void UPower::setDisplayDevice() {
auto thisPtr{static_cast<UPower *>(user_data)};
upDevice.upDevice = static_cast<UpDevice *>(data);
thisPtr->getUpDeviceInfo(upDevice);
if (upDevice.nativePath == nullptr) return;
if (0 == std::strcmp(upDevice.nativePath, thisPtr->nativePath_.c_str())) {
// Unref current upDevice
if (thisPtr->upDevice_.upDevice != NULL) g_object_unref(thisPtr->upDevice_.upDevice);