macros: allow NULL pointer in nm_clear_g_signal_handler()

It does not make sense to issue an error. This should be a helper function.
"NetworkManager[18341]: nm_clear_g_signal_handler: assertion 'G_IS_OBJECT (self)' failed"
error started since commit e6d7fee5a6 due to that.

(cherry picked from commit c33416178f)
This commit is contained in:
Jiří Klimeš 2015-10-09 20:31:29 +02:00 committed by Thomas Haller
parent a77a3aa7dd
commit 23313d711f

View file

@ -260,7 +260,8 @@ nm_clear_g_source (guint *id)
static inline gboolean
nm_clear_g_signal_handler (gpointer self, guint *id)
{
g_return_val_if_fail (G_IS_OBJECT (self), FALSE);
if (!self)
return FALSE;
if (id && *id) {
g_signal_handler_disconnect (self, *id);