'Fixed' the Mission Compiler crash.

--HG--
branch : gsoc2014-dfighter
This commit is contained in:
dfighter1985 2014-07-15 20:19:53 +02:00
parent 56a4c3ea7d
commit 1cbcca259c

View file

@ -90,7 +90,14 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) :
NLLIGO::Register();
// TODO try/catch exception. Crashes if path invalid.
m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false);
try{
m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false);
}
catch( NLMISC::Exception &e )
{
nlinfo( "Exception occured during Mission Compiler LIGO startup: %s", e.what() );
}
NLLIGO::CPrimitiveContext::instance().CurrentLigoConfig = &m_ligoConfig;
}