src/list.c

changeset 2586
c867f3e78ed3
parent 2548
1ad1da32caf8
child 2590
fecf2ce04325
--- a/src/list.c	Tue Oct 23 08:15:00 2001 +0000
+++ b/src/list.c	Tue Oct 23 08:22:48 2001 +0000
@@ -106,6 +106,9 @@
 	struct group *g;
 	char *good;
 
+	if (!g_slist_find(connections, gc))
+		return NULL;
+
 	if ((b = find_buddy(gc, buddy)) != NULL)
 		return b;
 
@@ -145,6 +148,8 @@
 	struct group *g = find_group(gc, group);
 	if (g)
 		return g;
+	if (!g_slist_find(connections, gc))
+		return NULL;
 	g = (struct group *)g_new0(struct group, 1);
 	if (!g)
 		return NULL;
@@ -170,6 +175,8 @@
 
 	strcpy(grpname, normalize (group));
 	if (gc) {
+		if (!g_slist_find(connections, gc))
+			return NULL;
 		grp = gc->groups;
 		while (grp) {
 			g = (struct group *)grp->data;
@@ -278,6 +285,8 @@
 	char *(*norm)(const char *);
 
 	if (gc) {
+		if (!g_slist_find(connections, gc))
+			return NULL;
 		if (gc->prpl->normalize)
 			norm = gc->prpl->normalize;
 		else

mercurial