Skip to content

Commit

Permalink
Fix crash reported by appcenter
Browse files Browse the repository at this point in the history
  • Loading branch information
Difegue committed Apr 12, 2024
1 parent da49ee7 commit 459e9d5
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ public async Task LoadDataAsync()
var albumList = await _mpdService.SafelySendCommandAsync(new ListCommand(MpdTags.Album));
var albumSortList = await _mpdService.SafelySendCommandAsync(new ListCommand(MpdTags.AlbumSort));

// Create a list of tuples
var response = albumList.Zip(albumSortList, (album, albumSort) => new Album{ Name = album, SortName = albumSort });

if (albumSortList != null)
if (albumList != null && albumSortList != null)
{
// Create a list of tuples
var response = albumList.Zip(albumSortList, (album, albumSort) => new Album { Name = album, SortName = albumSort });
GroupAlbumsByName(response);
}

if (Source.Count > 0)
FilteredSource.AddRange(Source);
Expand Down

0 comments on commit 459e9d5

Please sign in to comment.