X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=applet%2Fcpmpsubtitles.c;fp=applet%2Fcpmpsubtitles.c;h=5bf8b1c17f284928e403e1894df7cf8ed48e6ecf;hb=7a9025ae29ca94b12fe8a5e5d10fbee93d8eebfc;hp=81a052253a5bb517f8e7fac51383aadf570e44f3;hpb=ce459e7ee7a309fcbe0506b7ee1b28c02f678049;p=mafwsubrenderer 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++; }