From abaecf816e8b9f2c0afc754223c75e8634702b4c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 8 Jan 2010 16:29:42 +0100 Subject: Bug #606340 - Crash on non-utf8 letter in mail folder name --- shell/e-shell-sidebar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c index 517999bad5..5701321f24 100644 --- a/shell/e-shell-sidebar.c +++ b/shell/e-shell-sidebar.c @@ -22,6 +22,7 @@ #include "e-shell-sidebar.h" #include +#include #include #define E_SHELL_SIDEBAR_GET_PRIVATE(obj) \ @@ -604,7 +605,7 @@ e_shell_sidebar_set_primary_text (EShellSidebar *shell_sidebar, g_return_if_fail (E_IS_SHELL_SIDEBAR (shell_sidebar)); g_free (shell_sidebar->priv->primary_text); - shell_sidebar->priv->primary_text = g_strdup (primary_text); + shell_sidebar->priv->primary_text = e_utf8_ensure_valid (primary_text); gtk_widget_queue_resize (GTK_WIDGET (shell_sidebar)); g_object_notify (G_OBJECT (shell_sidebar), "primary-text"); @@ -650,7 +651,7 @@ e_shell_sidebar_set_secondary_text (EShellSidebar *shell_sidebar, g_return_if_fail (E_IS_SHELL_SIDEBAR (shell_sidebar)); g_free (shell_sidebar->priv->secondary_text); - shell_sidebar->priv->secondary_text = g_strdup (secondary_text); + shell_sidebar->priv->secondary_text = e_utf8_ensure_valid (secondary_text); gtk_widget_queue_resize (GTK_WIDGET (shell_sidebar)); g_object_notify (G_OBJECT (shell_sidebar), "secondary-text"); -- cgit