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:
parent
47c4ed87e3
commit
33043396b8
|
@ -975,7 +975,7 @@ public class HostConnectionObserver
|
||||||
* @param observer Playlist observer to call with last result
|
* @param observer Playlist observer to call with last result
|
||||||
*/
|
*/
|
||||||
private void replyWithLastResult(PlaylistEventsObserver observer) {
|
private void replyWithLastResult(PlaylistEventsObserver observer) {
|
||||||
if (hostState.lastGetPlaylistResults != null)
|
if (hostState.lastGetPlaylistResults != null && !hostState.lastGetPlaylistResults.isEmpty())
|
||||||
observer.playlistsAvailable(hostState.lastGetPlaylistResults);
|
observer.playlistsAvailable(hostState.lastGetPlaylistResults);
|
||||||
else
|
else
|
||||||
checkPlaylist();
|
checkPlaylist();
|
||||||
|
|
Loading…
Reference in New Issue