Package: ncmpcpp Version: 0.5.10-1.1 Severity: normal Tags: patch Hello,
When the playlist is empty and the 'B' key is pressed to select songs of album around cursor, the program terminates with std::out_of_range exception. -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.14-1.slh.2-aptosid-amd64 (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages ncmpcpp depends on: ii libc6 2.18-5 ii libcurl3-gnutls 7.36.0-2 ii libfftw3-double3 3.3.4-1 ii libgcc1 1:4.9.0-1 ii libmpdclient2 2.9-1 ii libncursesw5 5.9+20140118-1 ii libstdc++6 4.9.0-1 ii libtag1c2a 1.9.1-2 ii libtinfo5 5.9+20140118-1 ncmpcpp recommends no packages. Versions of packages ncmpcpp suggests: ii desktop-file-utils 0.22-1 ii mpd 0.18.10-2 -- no debconf information
Index: ncmpcpp-0.5.10/src/ncmpcpp.cpp =================================================================== --- ncmpcpp-0.5.10.orig/src/ncmpcpp.cpp 2014-05-04 19:57:12.000000000 +0300 +++ ncmpcpp-0.5.10/src/ncmpcpp.cpp 2014-05-04 19:58:59.000000000 +0300 @@ -1846,7 +1846,8 @@ { if (myScreen->allowsSelection()) { - if (List *mList = myScreen->GetList()) + List *mList = myScreen->GetList(); + if (mList && !mList->Empty()) { size_t pos = mList->Choice(); if (MPD::Song *s = myScreen->GetSong(pos))