Fix crash when server responds with garbage to language query (fixes #51)

This commit is contained in:
johni0702
2017-01-28 13:18:36 +01:00
parent db6b0ff5a6
commit 27fd25ae84

View File

@@ -82,7 +82,7 @@ public class LocalizationExtra implements Extra {
availableLanguages.put(langcode, prop);
return true;
} catch (ApiException e) {
if (e.getError().getId() != 16) { // This language has not been translated
if (e.getError() == null || e.getError().getId() != 16) { // This language has not been translated
e.printStackTrace();
}
} catch(ConnectException ce) {