Merge pull request #2929 from jasp00/render-segv
Destroy engine in text mode
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user