Commit 3156acdd authored by Marvin Scholz's avatar Marvin Scholz Committed by David
Browse files

macosx: simplify item count check

The item count and nil check can be combined as calling count
on nil will give 0 too.
parent 07283e6a
......@@ -299,7 +299,7 @@ static NSString *VLCAudioLibraryCellIdentifier = @"VLCAudioLibraryCellIdentifier
- (void)collectionSelectionDoubleClickAction:(id)sender
{
NSArray <VLCMediaLibraryAlbum *> *listOfAlbums;
NSArray <VLCMediaLibraryAlbum *> *listOfAlbums = nil;
switch (_currentParentType) {
case VLC_ML_PARENT_ARTIST:
......@@ -331,11 +331,7 @@ static NSString *VLCAudioLibraryCellIdentifier = @"VLCAudioLibraryCellIdentifier
break;
}
if (!listOfAlbums) {
return;
}
NSUInteger albumCount = listOfAlbums.count;
if (albumCount == 0) {
if (listOfAlbums.count == 0) {
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment