Add asset to 'clearWindow' to catch invalid uses

This commit is contained in:
Marianne Gagnon 2014-04-06 21:05:09 -04:00
parent 06a3d770e5
commit 569d68dfe1

View File

@ -174,6 +174,8 @@ ModalDialog::~ModalDialog()
void ModalDialog::clearWindow()
{
assert(m_irrlicht_window != NULL);
Widget* w;
for_in (w, m_widgets)
{
@ -182,8 +184,7 @@ void ModalDialog::clearWindow()
elementsWereDeleted();
m_widgets.clearAndDeleteAll();
if(m_irrlicht_window)
m_irrlicht_window->remove();
m_irrlicht_window->remove();
m_irrlicht_window = GUIEngine::getGUIEnv()->addWindow( m_area, true /* modal */ );
} // clearWindow