# HG changeset patch # User Paul Aurich # Date 1241332565 0 # Node ID 6a177edc401ea1465a02a0e228c70ca57c85ae47 # Parent 6c9e264aa88ddfd5e3ef4149dbc9bec18d270fa8 Avoid a g_markup_escape_text assertion failure diff -r 6c9e264aa88d -r 6a177edc401e libpurple/protocols/jabber/caps.c --- a/libpurple/protocols/jabber/caps.c Sat May 02 23:35:19 2009 +0000 +++ b/libpurple/protocols/jabber/caps.c Sun May 03 06:36:05 2009 +0000 @@ -826,8 +826,13 @@ JabberIdentity *id = (JabberIdentity*)node->data; char *category = g_markup_escape_text(id->category, -1); char *type = g_markup_escape_text(id->type, -1); - char *lang = g_markup_escape_text(id->lang, -1); - char *name = g_markup_escape_text(id->name, -1); + char *lang = NULL; + char *name = NULL; + + if (id->lang) + lang = g_markup_escape_text(id->lang, -1); + if (id->name) + name = g_markup_escape_text(id->name, -1); g_string_append_printf(verification, "%s/%s/%s/%s<", category, type, lang ? lang : "", name ? name : "");