Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Coudoin <bruno.coudoin@free.fr>2009-08-28 20:44:45 (GMT)
committer Bruno Coudoin <bruno.coudoin@free.fr>2009-08-28 20:44:45 (GMT)
commit85ed78de6d1f144769bf9240e83ca6ca91197980 (patch)
treeacc1cf35a2e8f9bc881099788bd2d1194737a91f
parentbe9e05f337b9862c40729d7a5b3b1872ab89c5f3 (diff)
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.
-rw-r--r--src/boards/advanced_colors.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/boards/advanced_colors.c b/src/boards/advanced_colors.c
index dab87de..e4bd4d3 100644
--- a/src/boards/advanced_colors.c
+++ b/src/boards/advanced_colors.c
@@ -480,7 +480,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);