aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-30 15:08:03 +0100
committerMax Kellermann <max@duempel.org>2013-01-30 15:08:09 +0100
commit3576a8fd9fb7bd550dba34c82cea1aa60e6f9cee (patch)
tree66ce8c94c6c98d712ba20c4c94389a18087d5947
parentf260cd031c47c396a89736fffa78248de467e9eb (diff)
downloadmpd-3576a8fd9fb7bd550dba34c82cea1aa60e6f9cee.tar.gz
mpd-3576a8fd9fb7bd550dba34c82cea1aa60e6f9cee.tar.xz
mpd-3576a8fd9fb7bd550dba34c82cea1aa60e6f9cee.zip
Main: delete the EventLoop after everything else
Fixes crash when another object attempts to access the EventLoop during destruction.
-rw-r--r--src/Main.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 6f8bc27d0..83baf4caa 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -539,8 +539,6 @@ int mpd_main(int argc, char *argv[])
/* cleanup */
- delete main_loop;
-
#ifdef ENABLE_INOTIFY
mpd_inotify_finish();
#endif
@@ -581,6 +579,7 @@ int mpd_main(int argc, char *argv[])
config_global_finish();
stats_global_finish();
io_thread_deinit();
+ delete main_loop;
daemonize_finish();
#ifdef WIN32
WSACleanup();