changeset 23212:f34fbd06984f

Ensure jbi->jb->resources is non-NULL before calling g_hash_table_size()
author Evan Schoenberg <evan.s@dreskin.net>
date Tue, 27 May 2008 02:10:35 +0000
parents ca6bbafcd079
children b24d5d112a14
files libpurple/protocols/jabber/buddy.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Tue May 27 01:38:38 2008 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Tue May 27 02:10:35 2008 +0000
@@ -960,7 +960,7 @@
 		}
 #endif
 	} else {
-		gboolean multiple_resources = g_hash_table_size(jbi->jb->resources) > 1;
+		gboolean multiple_resources = jbi->jb->resources && (g_hash_table_size(jbi->jb->resources) > 1);
 
 		for(resources = jbi->jb->resources; resources; resources = resources->next) {
 			char *purdy = NULL;