mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Fixed NullPointerException with i18n.
i18n class may not be initialized during init time.
This commit is contained in:
@ -53,6 +53,9 @@ public class I18n {
|
|||||||
public static String _(String s) {
|
public static String _(String s) {
|
||||||
String res;
|
String res;
|
||||||
try {
|
try {
|
||||||
|
if (i18n == null)
|
||||||
|
res = s;
|
||||||
|
else
|
||||||
res = i18n.getString(s);
|
res = i18n.getString(s);
|
||||||
} catch (MissingResourceException e) {
|
} catch (MissingResourceException e) {
|
||||||
res = s;
|
res = s;
|
||||||
|
Reference in New Issue
Block a user