IDEMPIERE-5010 Info Panel show NPE at console (#941)

add null check
This commit is contained in:
hengsin 2021-10-22 19:38:30 +08:00 committed by GitHub
parent 6a1ef46f44
commit 940586fa97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -2764,7 +2764,9 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
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){