IDEMPIERE-5567 Fix NPE running Period Control Management (#1798)

* IDEMPIERE-5567 Fix NPE running Period Control Management

* - defensive programming against NPE
This commit is contained in:
Carlos Ruiz 2023-04-25 08:16:06 +02:00 committed by GitHub
parent 5bf9301764
commit 86a91987e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -2533,10 +2533,10 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
*/
public void createT_Selection_InfoWindow(int AD_PInstance_ID)
{
MTable table = MTable.get(Env.getCtx(), getTableName());
MTable table = MTable.get(infoWindow.getAD_Table_ID());
StringBuilder insert = new StringBuilder();
insert.append("INSERT INTO T_Selection_InfoWindow (AD_PINSTANCE_ID, ");
if (table.isUUIDKeyTable())
if (table != null && table.isUUIDKeyTable())
insert.append("T_SELECTION_UU");
else
insert.append("T_SELECTION_ID");
@ -2789,8 +2789,8 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
fireValueChange(event);
}
else
{
int AD_Table_ID = MTable.getTable_ID(p_tableName);
{
int AD_Table_ID = infoWindow != null ? infoWindow.getAD_Table_ID() : -1;
if (AD_Table_ID <= 0)
{
if (p_keyColumn.endsWith("_ID") || p_keyColumn.endsWith("_UU"))