From 3576a8fd9fb7bd550dba34c82cea1aa60e6f9cee Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jan 2013 15:08:03 +0100 Subject: Main: delete the EventLoop after everything else Fixes crash when another object attempts to access the EventLoop during destruction. --- src/Main.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Main.cxx') diff --git a/src/Main.cxx b/src/Main.cxx index 6f8bc27d..83baf4ca 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(); -- cgit v1.2.3