BF [ 1893410 ] NPE when try to open Form Frame w/o class

This commit is contained in:
teo_sarca 2008-02-14 09:14:33 +00:00
parent e02854dee6
commit 1c40a3f7cd
2 changed files with 7 additions and 3 deletions

View File

@ -329,9 +329,13 @@ public class AMenuStartItem extends Thread implements ActionListener
}
}
ff = new FormFrame();
m_menu.getWindowManager().add(ff);
SwingUtilities.invokeLater(m_updatePB); // 1
ff.openForm(AD_Form_ID);
boolean ok = ff.openForm(AD_Form_ID);
if (!ok) {
ff.dispose();
return;
}
m_menu.getWindowManager().add(ff);
SwingUtilities.invokeLater(m_updatePB); // 2
// Center the window

View File

@ -199,7 +199,7 @@ public class FormFrame extends CFrame
{
log.config("");
// recursive calls
if (Trace.isCalledFrom("JFrame")) // [x] close window pressed
if (Trace.isCalledFrom("JFrame") && m_panel != null) // [x] close window pressed
m_panel.dispose();
m_panel = null;
Env.clearWinContext(m_WindowNo);