diff --git a/org.adempiere.base/src/org/compiere/model/MColumn.java b/org.adempiere.base/src/org/compiere/model/MColumn.java index 0f147a83fc..5e67a8922e 100644 --- a/org.adempiere.base/src/org/compiere/model/MColumn.java +++ b/org.adempiere.base/src/org/compiere/model/MColumn.java @@ -809,12 +809,15 @@ public class MColumn extends X_AD_Column foreignTable = "AD_Chart"; } - if (foreignTable.equals("AD_AllClients_V")) - foreignTable = "AD_Client"; - else if (foreignTable.equals("AD_AllUsers_V")) - foreignTable = "AD_User"; - else if (foreignTable.equals("AD_AllRoles_V")) - foreignTable = "AD_Role"; + if (foreignTable != null) { + if (foreignTable.equals("AD_AllClients_V")) { + foreignTable = "AD_Client"; + } else if (foreignTable.equals("AD_AllUsers_V")) { + foreignTable = "AD_User"; + } else if (foreignTable.equals("AD_AllRoles_V")) { + foreignTable = "AD_Role"; + } + } return foreignTable; }