diff options
author | Kalle Wallin <kaw@linux.se> | 2005-06-01 08:08:30 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2005-06-01 08:08:30 +0000 |
commit | 0ec3c493147a4c32104fead3e3cf45ccd1051ea9 (patch) | |
tree | 1edc6016221a11f7624b3fd9628af3d0e47e4062 /src | |
parent | 86d464488b8fdaa9481401b056c5acee311fe1cb (diff) | |
download | mpd-0ec3c493147a4c32104fead3e3cf45ccd1051ea9.tar.gz mpd-0ec3c493147a4c32104fead3e3cf45ccd1051ea9.tar.xz mpd-0ec3c493147a4c32104fead3e3cf45ccd1051ea9.zip |
Fixes #0000406, segfault if mpd wants a passwort but ncmpc connects without
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3304 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 8a48dc5fa..3dd7b6b94 100644 --- a/src/main.c +++ b/src/main.c @@ -253,6 +253,13 @@ main(int argc, const char *argv[]) { exit(EXIT_FAILURE); } + + /* if no password is used, but the mpd wants one, the connection + might be established but no status information is avaiable */ + mpdclient_update(mpd); + if(!mpd->status) + exit(EXIT_FAILURE); + connected = TRUE; D("Connected to MPD version %d.%d.%d\n", mpd->connection->version[0], |