BF [ 1893410 ] NPE when try to open Form Frame w/o class
This commit is contained in:
parent
e02854dee6
commit
1c40a3f7cd
|
@ -329,9 +329,13 @@ public class AMenuStartItem extends Thread implements ActionListener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ff = new FormFrame();
|
ff = new FormFrame();
|
||||||
m_menu.getWindowManager().add(ff);
|
|
||||||
SwingUtilities.invokeLater(m_updatePB); // 1
|
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
|
SwingUtilities.invokeLater(m_updatePB); // 2
|
||||||
|
|
||||||
// Center the window
|
// Center the window
|
||||||
|
|
|
@ -199,7 +199,7 @@ public class FormFrame extends CFrame
|
||||||
{
|
{
|
||||||
log.config("");
|
log.config("");
|
||||||
// recursive calls
|
// 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.dispose();
|
||||||
m_panel = null;
|
m_panel = null;
|
||||||
Env.clearWinContext(m_WindowNo);
|
Env.clearWinContext(m_WindowNo);
|
||||||
|
|
Loading…
Reference in New Issue