diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java index fb052fc091..c277569c5c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java @@ -542,7 +542,9 @@ public class DetailPane extends Panel implements EventListener, IdSpace { Toolbar toolbar = (Toolbar) tabpanel.getFirstChild(); IADTabpanel adtab = getADTabpanel(index); - if (adtab!=null && (adtab.getGridTab().isSortTab() || adtab.getGridTab().isReadOnly())) + if (adtab == null) + return; + if (adtab.getGridTab().isSortTab() || adtab.getGridTab().isReadOnly()) readOnly = true; boolean insertRecord = !readOnly; @@ -554,6 +556,8 @@ public class DetailPane extends Panel implements EventListener, IdSpace { boolean enableDelete = !changed && !readOnly && !adtab.getGridTab().isSortTab(); ADWindow adwindow = ADWindow.findADWindow(this); + if (adwindow == null) + return; List tabRestrictList = adwindow.getTabToolbarRestrictList(adtab.getGridTab().getAD_Tab_ID()); List windowRestrictList = adwindow.getWindowToolbarRestrictList();