Followed richtroye suggestion and implemented the net == NULL guard in
servlist_favchan_find().
This commit is contained in:
parent
133b0f7d94
commit
7353bf2698
|
@ -1094,7 +1094,7 @@ check_autojoin_channels (server *serv)
|
||||||
sess->willjoinchannel[0] = 0;
|
sess->willjoinchannel[0] = 0;
|
||||||
|
|
||||||
/* Is this channel in our favorites? */
|
/* Is this channel in our favorites? */
|
||||||
fav = serv->network == NULL ? NULL : servlist_favchan_find (serv->network, sess->waitchannel, NULL);
|
fav = servlist_favchan_find (serv->network, sess->waitchannel, NULL);
|
||||||
|
|
||||||
/* session->channelkey is initially unset for channels joined from the favorites. You have to fill them up manually from favorites settings. */
|
/* session->channelkey is initially unset for channels joined from the favorites. You have to fill them up manually from favorites settings. */
|
||||||
if (fav)
|
if (fav)
|
||||||
|
|
|
@ -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