Playlist: More defensive proramming for when trying to play an empty playlist.
This commit is contained in:
@@ -310,8 +310,13 @@ void Playlist::reset() {
|
||||
_started = false;
|
||||
}
|
||||
|
||||
String Playlist::get_current_file() {
|
||||
return _files[_current_track].filename;
|
||||
bool Playlist::get_current_file(String* dst) {
|
||||
if (_current_track < _files.size()) {
|
||||
return false;
|
||||
} else {
|
||||
dst->concat(_files[_current_track].filename);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t Playlist::get_position() {
|
||||
|
Reference in New Issue
Block a user