diff options
author | Diogo Sousa <diogogsousa@gmail.com> | 2013-05-24 21:49:46 +0100 |
---|---|---|
committer | Diogo Sousa <diogogsousa@gmail.com> | 2013-05-24 21:49:46 +0100 |
commit | 7353bf269817ead3c473c47b60f5b6b66900de73 (patch) | |
tree | da1a493ba410a17cd1e382935d2b23d6cebf221b /src/common/servlist.c | |
parent | 133b0f7d9425219c291f58f12421ff1f2dbdfcbb (diff) |
Followed richtroye suggestion and implemented the net == NULL guard in
servlist_favchan_find().
Diffstat (limited to 'src/common/servlist.c')
-rw-r--r-- | src/common/servlist.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |