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.
master
Martijn Brekhof 3 years ago committed by GitHub
parent 47c4ed87e3
commit 33043396b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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();

Loading…
Cancel
Save