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:
commit
b690098941
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue