Fixed OutOfBounds exception (#708)

This fixes an array out of bounds exception when the playlist is cleared
and the PlaylistFragment.playlistsAvailable is called with an empty
list.
This commit is contained in:
Martijn Brekhof 2020-02-13 09:46:12 +01:00 committed by GitHub
parent 47c4ed87e3
commit 33043396b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -975,7 +975,7 @@ public class HostConnectionObserver
* @param observer Playlist observer to call with last result
*/
private void replyWithLastResult(PlaylistEventsObserver observer) {
if (hostState.lastGetPlaylistResults != null)
if (hostState.lastGetPlaylistResults != null && !hostState.lastGetPlaylistResults.isEmpty())
observer.playlistsAvailable(hostState.lastGetPlaylistResults);
else
checkPlaylist();