summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorRichardHitt <rbh00@netcom.com>2013-05-24 14:07:14 -0700
committerRichardHitt <rbh00@netcom.com>2013-05-24 14:07:14 -0700
commitb690098941613261c5c1cc8cdb7e92ef0cc6871b (patch)
tree5a59787dc86fbdaccbe831b77253f953fd883e7e /src/common
parent4878012065e03f9e3fe9d22a243fd430651c55d2 (diff)
parentfffe9f4bd9dea9f61f19eeee08dea0c4dd072244 (diff)
Merge pull request #622 from orium/null-ptr-favchan-fix
Fixed null pointer deref when we try to autojoin a channel
Diffstat (limited to 'src/common')
-rw-r--r--src/common/servlist.c7
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;