IDEMPIERE-1737:Double click into header or blank area (when non row is selected) of info window make NPE

This commit is contained in:
hieplq 2014-02-06 13:59:46 +07:00
parent f269768f71
commit a03563cda5
1 changed files with 7 additions and 3 deletions

View File

@ -1283,6 +1283,11 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
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",
@ -1291,7 +1296,6 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
}
else
{
Integer recordId = contentPanel.getSelectedRowKey();
int AD_Table_ID = MTable.getTable_ID(p_tableName);
if (AD_Table_ID <= 0)
{