Commit 04ba433c authored by Max Kellermann's avatar Max Kellermann

Main: initialize Partition before Listener

Fixes nullptr dereference (regression by commit df5f9f4a).
parent d884272b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment