# HG changeset patch # User Stu Tomlinson # Date 1164226201 0 # Node ID b598a78c4550e5a5cb914771293f9eadc5be3f01 # Parent b4346a8b446ff66a0c8b8d6f9d69790a5ff71eec [gaim-migrate @ 17813] Don't crash when getting info on someone on jabber with no resource name committer: Tailor Script diff -r b4346a8b446f -r b598a78c4550 libgaim/protocols/jabber/buddy.c --- a/libgaim/protocols/jabber/buddy.c Wed Nov 22 18:47:42 2006 +0000 +++ b/libgaim/protocols/jabber/buddy.c Wed Nov 22 20:10:01 2006 +0000 @@ -602,7 +602,7 @@ GString *info_text; char *resource_name; JabberBuddyResource *jbr; - JabberBuddyInfoResource *jbir; + JabberBuddyInfoResource *jbir = NULL; GList *resources; /* not yet */ @@ -650,8 +650,9 @@ jbr = resources->data; if(jbr->status) purdy = gaim_strdup_withhtml(jbr->status); - g_string_append_printf(info_text, "%s: %s
", - _("Resource"), jbr->name); + if(jbr->name) + g_string_append_printf(info_text, "%s: %s
", + _("Resource"), jbr->name); g_string_append_printf(info_text, "%s: %d
", _("Priority"), jbr->priority); g_string_append_printf(info_text, "%s: %s%s%s
", @@ -661,7 +662,9 @@ if(purdy) g_free(purdy); - jbir = g_hash_table_lookup(jbi->resources, jbr->name); + if(jbr->name) + jbir = g_hash_table_lookup(jbi->resources, jbr->name); + if(jbir) { if(jbir->idle_seconds > 0) { g_string_append_printf(info_text, "%s: %s
",