From 350bbce59e0497cdd75b5278727c1575d7bd9281 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 22 Jun 2012 16:45:53 +0800 Subject: [PATCH] IDEMPIERE-305 Preference throws NPE --- .../WEB-INF/src/org/adempiere/webui/util/UserPreference.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java index e66f9c3e8f..551406537f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java @@ -148,7 +148,7 @@ public final class UserPreference implements Serializable { String value = VALUES[i]; MPreference preference = query.setParameters(new Object[]{m_AD_User_ID, attribute}).firstOnly(); - if (preference != null) { + if (preference != null && preference.getValue() != null) { value = preference.getValue(); }