diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/inbound.c | 2 | ||||
-rw-r--r-- | src/common/servlist.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c index d0424296..bbdd89c6 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -1094,7 +1094,7 @@ check_autojoin_channels (server *serv) sess->willjoinchannel[0] = 0; /* 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. */ if (fav) diff --git a/src/common/servlist.c b/src/common/servlist.c index d121dd47..a0a85695 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -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; |