From 7873afcf5467995837c9e5c2d2eaf56708b05826 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 31 May 2009 12:27:23 +0200 Subject: [PATCH] ConfigManager: do not save configuration upon destruction Do not save configuration file in destructor of ConfigManager as at this place the whole LMMS engine already has been shutdown and thus saving e.g. configuration of MidiControlListener causes a segfault. Instead explicitely save configuration file at the beginning of Engine::destroy(). Signed-off-by: Tobias Doerffel --- src/core/config_mgr.cpp | 1 - src/core/engine.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/config_mgr.cpp b/src/core/config_mgr.cpp index f99a08604..7a7115c4f 100644 --- a/src/core/config_mgr.cpp +++ b/src/core/config_mgr.cpp @@ -78,7 +78,6 @@ configManager::configManager( void ) : configManager::~configManager() { - saveConfigFile(); } diff --git a/src/core/engine.cpp b/src/core/engine.cpp index eb5405419..c6ab457e0 100644 --- a/src/core/engine.cpp +++ b/src/core/engine.cpp @@ -149,6 +149,8 @@ void engine::init( const bool _has_gui ) void engine::destroy( void ) { + configManager::inst()->saveConfigFile(); + s_mixer->stopProcessing(); delete s_projectNotes;