[glib/pgriffis/low-power-monitor: 1/2] gio: g_clear_signal_handler() can handle NULL args




commit 55ecf2501de95c7041979c0e763ad17e2b77e01a
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jul 28 15:10:16 2021 +0200

    gio: g_clear_signal_handler() can handle NULL args

 gio/gmemorymonitordbus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gio/gmemorymonitordbus.c b/gio/gmemorymonitordbus.c
index a34a58d3b..d754a36d0 100644
--- a/gio/gmemorymonitordbus.c
+++ b/gio/gmemorymonitordbus.c
@@ -115,8 +115,7 @@ lmm_vanished_cb (GDBusConnection *connection,
 {
   GMemoryMonitorDBus *dbus = user_data;
 
-  if (dbus->proxy != NULL)
-    g_clear_signal_handler (&dbus->signal_id, dbus->proxy);
+  g_clear_signal_handler (&dbus->signal_id, dbus->proxy);
   g_clear_object (&dbus->proxy);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]