use device variable instead of getting the device from the map

This commit is contained in:
Erik Reider 2022-03-15 22:50:11 +01:00
parent d47073ef13
commit 9b9e42fc5f
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ void UPower::addDevice(UpDevice* device) {
if (device) { if (device) {
const gchar* objectPath = up_device_get_object_path(device); const gchar* objectPath = up_device_get_object_path(device);
devices[objectPath] = device; devices[objectPath] = device;
g_signal_connect(devices[objectPath], "notify", G_CALLBACK(deviceNotify_cb), this); g_signal_connect(device, "notify", G_CALLBACK(deviceNotify_cb), this);
} }
} }