From 38b0c991851bd1067df10ca6a269fc87b81a8a98 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 17 Apr 2016 18:45:29 +0200 Subject: [PATCH] Prevent NPE --- .../beans/localization/PizzaLocalizationSessionBean.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java index b6b67c49..648cf36d 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java @@ -56,6 +56,12 @@ public class PizzaLocalizationSessionBean extends BaseDatabaseBean implements Pi // Log trace message //this.getLoggerBeanLocal().logTrace(MessageFormat.format("PizzaLocalizationSessionBean::setLanguage: language={0} - CALLED!", language)); //NOI18N + // Is the language null? + if (null == language) { + // This may sometimes happen, so abort here + return; + } + // Language splits String[] splits = language.split("_"); //NOI18N if (null == splits[1]) { -- 2.39.5