IDEMPIERE-5520 Navigation between Tabs leave Detached DOM objects (Leak) (#1650)

- Fix NPE
This commit is contained in:
hengsin 2023-01-26 20:54:59 +08:00 committed by GitHub
parent 29f59e645f
commit 6d9ae6e50e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 8 deletions

View File

@ -346,16 +346,20 @@ public abstract class TabbedDesktop extends AbstractDesktop {
if (windowNo == (Integer)att)
{
Tab tab = panel.getLinkedTab();
panel.getLinkedTab().onClose();
if (tab.getParent() == null)
{
unregisterWindow(windowNo);
if (tab != null) {
panel.getLinkedTab().onClose();
if (tab.getParent() == null)
{
unregisterWindow(windowNo);
return true;
}
else
{
return false;
}
} else {
return true;
}
else
{
return false;
}
}
}
}