summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/channels-query.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/irc/core/channels-query.c b/src/irc/core/channels-query.c
index 857ebaf0..d7dadf04 100644
--- a/src/irc/core/channels-query.c
+++ b/src/irc/core/channels-query.c
@@ -119,21 +119,22 @@ static void query_remove_all(IRC_CHANNEL_REC *channel)
int n;
rec = channel->server->chanqueries;
+ if (rec == NULL) return;
/* remove channel from query lists */
for (n = 0; n < CHANNEL_QUERIES; n++)
rec->queries[n] = g_slist_remove(rec->queries[n], channel);
rec->current_queries = g_slist_remove(rec->current_queries, channel);
- query_check(channel->server);
+ if (!channel->server->disconnected)
+ query_check(channel->server);
}
static void sig_channel_destroyed(IRC_CHANNEL_REC *channel)
{
g_return_if_fail(channel != NULL);
- if (IS_IRC_CHANNEL(channel) && !channel->server->disconnected &&
- !channel->synced)
+ if (IS_IRC_CHANNEL(channel))
query_remove_all(channel);
}