plugins/jabber/jabber.c

changeset 1611
4f0728d762eb
parent 1551
4cfecf7ef756
child 1624
73c1dbcbbcf9
--- a/plugins/jabber/jabber.c	Sat Mar 17 13:02:57 2001 +0000
+++ b/plugins/jabber/jabber.c	Sat Mar 17 13:10:00 2001 +0000
@@ -607,11 +607,12 @@
 	if (!cnv) {
 		resources = b->proto_data;
 		res = who->resource;
-		while (resources) {
-			if (!strcmp(res, resources->data))
-				break;
-			resources = resources->next;
-		}
+		if (res)
+			while (resources) {
+				if (!strcmp(res, resources->data))
+					break;
+				resources = resources->next;
+			}
 
 		if (type && (strcasecmp(type, "unavailable") == 0)) {
 			g_free(resources->data);

mercurial