From 940586fa974f50e98a4d6481dd65fb241af06f54 Mon Sep 17 00:00:00 2001 From: hengsin Date: Fri, 22 Oct 2021 19:38:30 +0800 Subject: [PATCH] IDEMPIERE-5010 Info Panel show NPE at console (#941) add null check --- .../WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index 1457ce8ba8..dbdec348b8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -2764,7 +2764,9 @@ public abstract class InfoPanel extends Window implements EventListener, public void onPageDetached(Page page) { super.onPageDetached(page); try { - SessionManager.getSessionApplication().getKeylistener().removeEventListener(Events.ON_CTRL_KEY, this); + if (SessionManager.getSessionApplication() != null && + SessionManager.getSessionApplication().getKeylistener() != null) + SessionManager.getSessionApplication().getKeylistener().removeEventListener(Events.ON_CTRL_KEY, this); if (infoWindow != null && getFirstChild() != null) saveWlistBoxColumnWidth(getFirstChild()); } catch (Exception e){