From da2fd9fffb6d1670191ef36ba68879633f84a9d4 Mon Sep 17 00:00:00 2001 From: hieplq Date: Wed, 8 Apr 2015 02:11:46 +0700 Subject: [PATCH] IDEMPIERE-2565:NPE when run init client without input city of country has "Allow Cities out of List" = false --- org.adempiere.base/src/org/compiere/model/MLocation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MLocation.java b/org.adempiere.base/src/org/compiere/model/MLocation.java index 4590abdf22..fdfba19127 100644 --- a/org.adempiere.base/src/org/compiere/model/MLocation.java +++ b/org.adempiere.base/src/org/compiere/model/MLocation.java @@ -439,7 +439,7 @@ public class MLocation extends X_C_Location implements Comparator public boolean isAddressLinesReverse() { // Local - if (getC_Country_ID() == MCountry.getDefault(getCtx()).getC_Country_ID()) + if (MCountry.getDefault(getCtx()) != null && getC_Country_ID() == MCountry.getDefault(getCtx()).getC_Country_ID()) return getCountry().isAddressLinesLocalReverse(); return getCountry().isAddressLinesReverse(); } // isAddressLinesReverse