g_clear_handle_id: don't accept NULL clear_func

Fixes #1401.
This commit is contained in:
Will Thompson 2018-06-04 13:11:49 +01:00
parent e0f82b9494
commit 0f7c196c21
No known key found for this signature in database
GPG Key ID: 3422DC0D7AD482A7
2 changed files with 2 additions and 4 deletions

View File

@ -2437,8 +2437,7 @@ g_clear_handle_id (guint *tag_ptr,
if (_handle_id > 0)
{
*tag_ptr = 0;
if (clear_func != NULL)
clear_func (_handle_id);
clear_func (_handle_id);
}
}

View File

@ -590,8 +590,7 @@ void g_clear_handle_id (guint *tag_ptr,
if (_handle_id > 0) \
{ \
*_tag_ptr = 0; \
if (clear_func != NULL) \
clear_func (_handle_id); \
clear_func (_handle_id); \
} \
} G_STMT_END