status: fix assertion failure on window resize without active mpd connection

master
Andrzej Rybczak 11 years ago
parent a3d536b422
commit 310d280cef
  1. 1
      NEWS
  2. 3
      src/status.cpp

@ -7,6 +7,7 @@ ncmpcpp-0.6.5 (????-??-??)
* Xiph tag DESCRIPTION is now rewritten as COMMENT when updating tags.
* Possible access of already freed memory when downloading artist info is fixed.
* Name of an item is now displayed correctly if present.
* Assertion failure when resizing terminal window with no active MPD connection is fixed.
ncmpcpp-0.6.4 (2015-05-02)

@ -557,7 +557,7 @@ void Status::Changes::elapsedTime(bool update_elapsed)
m_kbps = st.kbps();
}
if (m_player_state == MPD::psStop)
if (m_player_state == MPD::psUnknown || m_player_state == MPD::psStop)
{
if (Statusbar::isUnlocked() && Config.statusbar_visibility)
*wFooter << NC::XY(0, 1) << wclrtoeol;
@ -565,6 +565,7 @@ void Status::Changes::elapsedTime(bool update_elapsed)
}
std::string ps = playerStateToString(m_player_state);
MPD::Song np = myPlaylist->nowPlayingSong();
drawTitle(np);

Loading…
Cancel
Save