Skip to content
Snippets Groups Projects
Commit a56516ad authored by Claudio Cambra's avatar Claudio Cambra Committed by François Cartegnie
Browse files

macosx: Fix crash on search in home view


Signed-off-by: default avatarClaudio Cambra <developer@claudiocambra.com>
parent ab6eb974
No related branches found
No related tags found
1 merge request!5012macosx: Fix crash on search in home view
Pipeline #443990 passed with stage
in 17 minutes and 47 seconds
......@@ -79,9 +79,10 @@
- (VLCMediaLibraryMediaItem *)randomItem
{
VLCLibraryModel * const libraryModel = VLCMain.sharedInstance.libraryController.libraryModel;
const size_t videoCount = libraryModel.numberOfVideoMedia;
NSArray * const videos = libraryModel.listOfVideoMedia;
const NSInteger videoCount = videos.count;
const uint32_t randIdx = arc4random_uniform((uint32_t)(videoCount - 1));
return [libraryModel.listOfVideoMedia objectAtIndex:randIdx];
return [videos objectAtIndex:randIdx];
}
- (VLCMediaLibraryMediaItem *)latestPartiallyPlayedItem
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment