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.
This commit is contained in:
Jiří Klimeš 2015-10-09 20:31:29 +02:00
parent 90b5e4e3c5
commit c33416178f

View file

@ -210,7 +210,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);