From 8d65ac559641a7fbe40562254f8536f5929fa897 Mon Sep 17 00:00:00 2001 From: Javier Serrano Polo Date: Thu, 21 Jul 2016 20:53:08 +0200 Subject: [PATCH] Destroy engine in text mode --- src/core/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/main.cpp b/src/core/main.cpp index 8bfd974b7..8b4f7b888 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -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();