aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-20 00:03:49 +0100
committerMax Kellermann <max@duempel.org>2014-02-20 00:04:23 +0100
commit04ba433ca631f0c3f51b067a6b55dc1046bd287e (patch)
tree9b00f398c9e875bd011732d5fb334b1fcf448e1c
parentd884272ba878321017045eef0e3da441b45198e2 (diff)
downloadmpd-04ba433ca631f0c3f51b067a6b55dc1046bd287e.tar.gz
mpd-04ba433ca631f0c3f51b067a6b55dc1046bd287e.tar.xz
mpd-04ba433ca631f0c3f51b067a6b55dc1046bd287e.zip
Main: initialize Partition before Listener
Fixes nullptr dereference (regression by commit df5f9f4a).
Diffstat (limited to '')
-rw-r--r--src/Main.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index c9de56873..cfb2dcc92 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -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);