--- a/libpurple/protocols/facebook/data.c Tue Mar 21 00:46:58 2023 -0500 +++ b/libpurple/protocols/facebook/data.c Tue Mar 21 01:59:19 2023 -0500 @@ -292,8 +292,8 @@ ptr = g_hash_table_lookup(fata->evs, name); id = GPOINTER_TO_UINT(ptr); - if ((id > 0) && remove) { - g_source_remove(id); + if(remove) { + g_clear_handle_id(&id, g_source_remove); } g_hash_table_remove(fata->evs, name);