Destroy engine in text mode

This commit is contained in:
Javier Serrano Polo
2016-07-21 20:53:08 +02:00
parent 7a98b3e669
commit 8d65ac5596

View File

@@ -627,11 +627,14 @@ int main( int argc, char * * argv )
}
#endif
bool destroyEngine = false;
// if we have an output file for rendering, just render the song
// without starting the GUI
if( !renderOut.isEmpty() )
{
Engine::init( true );
destroyEngine = true;
QFileInfo fileInfo( fileToLoad );
if ( !fileInfo.exists() )
@@ -860,6 +863,11 @@ int main( int argc, char * * argv )
const int ret = app->exec();
delete app;
if( destroyEngine )
{
Engine::destroy();
}
// cleanup memory managers
MemoryManager::cleanup();