From b36beeb4c05b119040532ff051dd2838639282a4 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 3 Jul 2014 13:01:18 +0200 Subject: [PATCH] Fixed NullPointerException with i18n. i18n class may not be initialized during init time. --- app/src/processing/app/I18n.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/I18n.java b/app/src/processing/app/I18n.java index 6cc2312af..d6480d99e 100644 --- a/app/src/processing/app/I18n.java +++ b/app/src/processing/app/I18n.java @@ -53,7 +53,10 @@ public class I18n { public static String _(String s) { String res; try { - res = i18n.getString(s); + if (i18n == null) + res = s; + else + res = i18n.getString(s); } catch (MissingResourceException e) { res = s; }