diff options
Diffstat (limited to 'embed')
-rw-r--r-- | embed/mozilla/mozilla-notifiers.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp index 1dd53a385..a85620e0b 100644 --- a/embed/mozilla/mozilla-notifiers.cpp +++ b/embed/mozilla/mozilla-notifiers.cpp @@ -596,8 +596,10 @@ mozilla_language_notifier(GConfClient *client, GSList *languages, *l; GString *result; - result = g_string_new (""); languages = eel_gconf_get_string_list (CONF_RENDERING_LANGUAGE); + g_return_if_fail (languages != NULL); + + result = g_string_new (""); for (l = languages; l != NULL; l = l->next) { @@ -625,6 +627,9 @@ mozilla_language_notifier(GConfClient *client, mozilla_prefs_set_string ("intl.accept_languages", result->str); g_string_free (result, TRUE); + + g_slist_foreach (languages, (GFunc) g_free, NULL); + g_slist_free (languages); } static char *autodetect_charset_prefs[] = |