Main: delete the EventLoop after everything else

Fixes crash when another object attempts to access the EventLoop
during destruction.
This commit is contained in:
Max Kellermann 2013-01-30 15:08:03 +01:00
parent f260cd031c
commit 3576a8fd9f

View File

@ -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();