diff --git a/source/net/sourceforge/filebot/ui/Language.java b/source/net/sourceforge/filebot/ui/Language.java index 522f4684..d63b749e 100644 --- a/source/net/sourceforge/filebot/ui/Language.java +++ b/source/net/sourceforge/filebot/ui/Language.java @@ -67,6 +67,9 @@ public class Language { try { return new Language(code, bundle.getString(code + ".name")); } catch (Exception e) { + if (code == null || code.isEmpty()) { + return null; + } return new Language(code, new Locale(code).getDisplayLanguage(Locale.ROOT)); } }