From 7353bf269817ead3c473c47b60f5b6b66900de73 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Fri, 24 May 2013 21:49:46 +0100 Subject: Followed richtroye suggestion and implemented the net == NULL guard in servlist_favchan_find(). --- src/common/servlist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/common/servlist.c') 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; -- cgit 1.4.1