1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-10-31 15:35:03 -04:00

Merge pull request #622 from orium/null-ptr-favchan-fix

Fixed null pointer deref when we try to autojoin a channel
This commit is contained in:
RichardHitt 2013-05-24 14:07:14 -07:00
commit b690098941

View File

@ -877,10 +877,15 @@ servlist_server_find (ircnet *net, char *name, int *pos)
favchannel * favchannel *
servlist_favchan_find (ircnet *net, char *channel, int *pos) servlist_favchan_find (ircnet *net, char *channel, int *pos)
{ {
GSList *list = net->favchanlist; GSList *list;
favchannel *favchan; favchannel *favchan;
int i = 0; int i = 0;
if (net == NULL)
return NULL;
list = net->favchanlist;
while (list) while (list)
{ {
favchan = list->data; favchan = list->data;