pidgin: 50027ffb: Ensure jbi->jb->resources is non-NULL be...

evands at pidgin.im evands at pidgin.im
Mon May 26 22:16:19 EDT 2008


-----------------------------------------------------------------
Revision: 50027ffb72aa28611223334d4412ebb0c4e787f5
Ancestor: 529ef9464a2679b6c81a94a97270633881245612
Author: evands at pidgin.im
Date: 2008-05-27T02:10:35
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/50027ffb72aa28611223334d4412ebb0c4e787f5

Modified files:
        libpurple/protocols/jabber/buddy.c

ChangeLog: 

Ensure jbi->jb->resources is non-NULL before calling g_hash_table_size()

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/buddy.c	f71a01a3450419baa3f3dfe0da8bc41f2c665928
+++ libpurple/protocols/jabber/buddy.c	47e8c5add1251475fca7ba0ae4319da6a0b38e62
@@ -960,7 +960,7 @@ static void jabber_buddy_info_show_if_re
 		}
 #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;


More information about the Commits mailing list