From 6f06ec0aba97c5dd89ffbe0f3592f3979d86d223 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 12 Oct 2015 11:05:04 +0200 Subject: [PATCH] macros: remove early return from nm_clear_g_signal_handler() It is valid to call nm_clear_g_signal_handler() with missing @self argument if (and only if) the @id is unspecified as well. Remove the check for @self to get an assertion in case @id is missing *and* @self is invalid. In this case, g_signal_handler_disconnect() will raise a g_critical() for us. Fixes: c33416178f88353b2f424a18c576de09b6ae3215 (cherry picked from commit 76958f94d4f7a8536dc6fa8676bd8de31bc661c1) --- include/nm-macros-internal.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/nm-macros-internal.h b/include/nm-macros-internal.h index 4d9979f3f5..3c5adcc1cf 100644 --- a/include/nm-macros-internal.h +++ b/include/nm-macros-internal.h @@ -260,9 +260,6 @@ nm_clear_g_source (guint *id) static inline gboolean nm_clear_g_signal_handler (gpointer self, guint *id) { - if (!self) - return FALSE; - if (id && *id) { g_signal_handler_disconnect (self, *id); *id = 0;