1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Fix segfault in query_remove_all

It is possible for rec to be NULL in query_remove_all, resulting in a
segfault. So return without doing anything if rec is NULL.
This commit is contained in:
Joseph Bisch 2017-10-08 22:02:44 -04:00
parent 49ace3251b
commit 2edd816e7d
No known key found for this signature in database
GPG Key ID: CF08FAC339AB7E8E

View File

@ -119,6 +119,7 @@ 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++)