mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 11:50:18 +01:00
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 commite6d7fee5a6due to that. (cherry picked from commitc33416178f)
This commit is contained in:
parent
a77a3aa7dd
commit
23313d711f
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue