From 9b9e42fc5fc1164e76e4a0783629380878d68c02 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Tue, 15 Mar 2022 22:50:11 +0100 Subject: [PATCH] use device variable instead of getting the device from the map --- src/modules/upower/upower.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/upower/upower.cpp b/src/modules/upower/upower.cpp index a26dc9ed..153f2b68 100644 --- a/src/modules/upower/upower.cpp +++ b/src/modules/upower/upower.cpp @@ -110,7 +110,7 @@ void UPower::addDevice(UpDevice* device) { if (device) { const gchar* objectPath = up_device_get_object_path(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); } }