mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Check for NULL before clearing connection data
This commit is contained in:
parent
784d9642bc
commit
086fd30e23
@ -216,10 +216,14 @@ connection_set_disconnected(void)
|
|||||||
void
|
void
|
||||||
connection_clear_data(void)
|
connection_clear_data(void)
|
||||||
{
|
{
|
||||||
g_hash_table_destroy(conn.features_by_jid);
|
if (conn.features_by_jid) {
|
||||||
conn.features_by_jid = NULL;
|
g_hash_table_destroy(conn.features_by_jid);
|
||||||
|
conn.features_by_jid = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
g_hash_table_remove_all(conn.available_resources);
|
if (conn.available_resources) {
|
||||||
|
g_hash_table_remove_all(conn.available_resources);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBMESODE
|
#ifdef HAVE_LIBMESODE
|
||||||
|
Loading…
Reference in New Issue
Block a user