COMMON: Fixed out of index of LocaleDialog 46/16146/1
authorchanghyun1.lee <changhyun1.lee@samsung.com>
Fri, 7 Feb 2014 11:40:23 +0000 (20:40 +0900)
committerchanghyun1.lee <changhyun1.lee@samsung.com>
Fri, 7 Feb 2014 11:40:23 +0000 (20:40 +0900)
Change-Id: I1acb0a670479a3304d868aa45638cf9659a82ac9
Signed-off-by: changhyun1.lee <changhyun1.lee@samsung.com>
org.tizen.common/src/org/tizen/common/ui/dialog/LocaleDialog.java

index 529df4f..78e1adf 100644 (file)
@@ -195,7 +195,9 @@ public class LocaleDialog extends SelectionStatusDialog {
         });
 
         if ( filter.contains( DEFAULT_LANG ) ) {
-            langComboViewer.setSelection( new StructuredSelection(langComboViewer.getCombo().getItem(0)) );
+            if ( langComboViewer.getCombo().getItemCount() != 0 ) {
+                langComboViewer.setSelection( new StructuredSelection(langComboViewer.getCombo().getItem(0)) );
+            }
         } else {
             langComboViewer.setSelection( new StructuredSelection(DEFAULT_LANG) );
         }
@@ -287,4 +289,8 @@ public class LocaleDialog extends SelectionStatusDialog {
         return DEFAULT_LANG;
     }
 
+    public int getLangLength() {
+        return WRT_LANG_LISTS.length + CUSTOM_LANG_LISTS.size();
+    }
+
 }