From a03563cda53911e7318bdad5f9ddf77914c8c376 Mon Sep 17 00:00:00 2001 From: hieplq Date: Thu, 6 Feb 2014 13:59:46 +0700 Subject: [PATCH] IDEMPIERE-1737:Double click into header or blank area (when non row is selected) of info window make NPE --- .../src/org/adempiere/webui/panel/InfoPanel.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 d567fc8972..fe3577bb26 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 @@ -1282,7 +1282,12 @@ public abstract class InfoPanel extends Window implements EventListener, } public void zoom() - { + { + Integer recordId = contentPanel.getSelectedRowKey(); + // prevent NPE when double click is raise but no recore is selected + if (recordId == null) + return; + if (listeners != null && listeners.size() > 0) { ValueChangeEvent event = new ValueChangeEvent(this,"zoom", @@ -1290,8 +1295,7 @@ public abstract class InfoPanel extends Window implements EventListener, fireValueChange(event); } else - { - Integer recordId = contentPanel.getSelectedRowKey(); + { int AD_Table_ID = MTable.getTable_ID(p_tableName); if (AD_Table_ID <= 0) {