Main: initialize Partition before Listener

Fixes nullptr dereference (regression by commit df5f9f4a).
This commit is contained in:
Max Kellermann 2014-02-20 00:03:49 +01:00
parent d884272ba8
commit 04ba433ca6

View File

@ -432,6 +432,8 @@ int mpd_main(int argc, char *argv[])
const unsigned max_clients = config_get_positive(CONF_MAX_CONN, 10);
instance->client_list = new ClientList(max_clients);
initialize_decoder_and_player();
if (!listen_global_init(*instance->event_loop, *instance->partition,
error)) {
LogError(error);
@ -475,7 +477,6 @@ int mpd_main(int argc, char *argv[])
glue_sticker_init();
command_init();
initialize_decoder_and_player();
initAudioConfig();
instance->partition->outputs.Configure(*instance->event_loop,
instance->partition->pc);