Do not crash when trying to reverse an empty playlist
Fixes https://github.com/ncmpcpp/ncmpcpp/issues/616.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# ncmpcpp-0.10.1 (2024-??-??)
|
# ncmpcpp-0.10.1 (2024-??-??)
|
||||||
* Fix compilation with `libc++`.
|
* Fix compilation with `libc++`.
|
||||||
* Remove `autogen.sh` in favour of `autoreconf`.
|
* Remove `autogen.sh` in favour of `autoreconf`.
|
||||||
|
* Do not crash when trying to reverse an empty playlist.
|
||||||
|
|
||||||
# ncmpcpp-0.10 (2024-09-03)
|
# ncmpcpp-0.10 (2024-09-03)
|
||||||
* Add the configuration option `mpd_password`.
|
* Add the configuration option `mpd_password`.
|
||||||
|
|||||||
@@ -1998,7 +1998,10 @@ bool ReversePlaylist::canBeRun()
|
|||||||
return false;
|
return false;
|
||||||
m_begin = myPlaylist->main().begin();
|
m_begin = myPlaylist->main().begin();
|
||||||
m_end = myPlaylist->main().end();
|
m_end = myPlaylist->main().end();
|
||||||
return findSelectedRangeAndPrintInfoIfNot(m_begin, m_end);
|
if (m_begin == m_end)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return findSelectedRangeAndPrintInfoIfNot(m_begin, m_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReversePlaylist::run()
|
void ReversePlaylist::run()
|
||||||
|
|||||||
Reference in New Issue
Block a user