diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index fcd9346e..3ec0bba5 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -457,8 +457,10 @@ static void sig_destroyed(IRC_SERVER_REC *server) server->cap_queue = NULL; /* was g_free_and_null, but can't use on a GString */ - g_string_free(server->sasl_buffer, TRUE); - server->sasl_buffer = NULL; + if (server->sasl_buffer != NULL) { + g_string_free(server->sasl_buffer, TRUE); + server->sasl_buffer = NULL; + } /* these are dynamically allocated only if isupport was sent */ g_hash_table_foreach(server->isupport,