pidgin: 8a23e76c: Avoid a g_markup_escape_text assertion f...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Sun May 3 02:55:41 EDT 2009


-----------------------------------------------------------------
Revision: 8a23e76c1b796430786141442e693a924790838c
Ancestor: 840eccc603a4027894256642e8079b1960c7c9ba
Author: darkrain42 at pidgin.im
Date: 2009-05-03T06:36:05
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8a23e76c1b796430786141442e693a924790838c

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

ChangeLog: 

Avoid a g_markup_escape_text assertion failure

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/caps.c	8a0969e52fc1a7e895b45f7657feec2fbd30a88c
+++ libpurple/protocols/jabber/caps.c	9d177f7f83ddc4b5325031317a31907bc3fba840
@@ -826,8 +826,13 @@ gchar *jabber_caps_calculate_hash(Jabber
 		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 : "");


More information about the Commits mailing list