diff options
author | RichardHitt <rbh00@netcom.com> | 2013-05-24 14:07:14 -0700 |
---|---|---|
committer | RichardHitt <rbh00@netcom.com> | 2013-05-24 14:07:14 -0700 |
commit | b690098941613261c5c1cc8cdb7e92ef0cc6871b (patch) | |
tree | 5a59787dc86fbdaccbe831b77253f953fd883e7e | |
parent | 4878012065e03f9e3fe9d22a243fd430651c55d2 (diff) | |
parent | fffe9f4bd9dea9f61f19eeee08dea0c4dd072244 (diff) |
Merge pull request #622 from orium/null-ptr-favchan-fix
Fixed null pointer deref when we try to autojoin a channel
-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; |