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
1 changed files with 6 additions and 1 deletions

View File

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