From 8adcad2b0ad7de44ab92c5b0b2ddd4388402ddcb Mon Sep 17 00:00:00 2001 From: Bruno Coudoin Date: Fri, 28 Aug 2009 20:44:45 +0000 Subject: Fixed a major bug resulting in garbled string in the advanced color activity. In this activity the color to search was garbled in American english and in case there is no translations available for the running locale. --- diff --git a/src/boards/advanced_colors.c b/src/boards/advanced_colors.c index 2f94ef6..2762d97 100644 --- a/src/boards/advanced_colors.c +++ b/src/boards/advanced_colors.c @@ -481,7 +481,10 @@ static void add_xml_data(xmlDocPtr doc, xmlNodePtr xmlnode, GNode * child) if(text) { colors[i] = gettext((char *)text); - g_free(text); + + // We got a translation, free the original value + if ( text != colors[i] ) + g_free(text); } text = NULL; g_free(sColor); -- cgit v0.9.1