aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-charset.c')
-rw-r--r--e-util/e-charset.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/e-util/e-charset.c b/e-util/e-charset.c
index ffee5a8f4a..d2b7a91eeb 100644
--- a/e-util/e-charset.c
+++ b/e-util/e-charset.c
@@ -228,10 +228,12 @@ e_charset_add_radio_actions (GtkActionGroup *action_group,
action = gtk_radio_action_new (
action_name, charset_label, NULL, NULL, def);
- /* Character set name is static so no need to free it. */
- g_object_set_data (
+ /* Character set name may NOT be static,
+ * so we do need to duplicate the string. */
+ g_object_set_data_full (
G_OBJECT (action), "charset",
- (gpointer) charset_name);
+ g_strdup (charset_name),
+ (GDestroyNotify) g_free);
gtk_radio_action_set_group (action, group);
group = gtk_radio_action_get_group (action);