From 7a9025ae29ca94b12fe8a5e5d10fbee93d8eebfc Mon Sep 17 00:00:00 2001 From: Roman Moravcik Date: Tue, 20 Jul 2010 12:02:52 +0200 Subject: [PATCH] Fixed crash of applet when encoding "Arabic (ISO-8859-6)" was previously selected. --- applet/cpmpsubtitles.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/applet/cpmpsubtitles.c b/applet/cpmpsubtitles.c index 81a0522..5bf8b1c 100644 --- a/applet/cpmpsubtitles.c +++ b/applet/cpmpsubtitles.c @@ -676,14 +676,15 @@ create_subtitles_encoding_button (GConfClient *gconf_client) encoding = gconf_get_string (gconf_client, "subtitle_encoding"); if (encoding) { - /* skip current locale */ - gint index = 1; + gint index = 0; while (index < SUBTITLE_ENCODING_LAST) { - if (strcmp (encodings[index].charset, encoding) == 0) { - hildon_picker_button_set_active (HILDON_PICKER_BUTTON (button), - index); - break; + if (encodings[index].charset) { + if (strcmp (encodings[index].charset, encoding) == 0) { + hildon_picker_button_set_active (HILDON_PICKER_BUTTON (button), + index); + break; + } } index++; } -- 1.7.9.5