Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
644d434d by Claudio Cambra at 2024-03-29T09:37:08+00:00
macosx: Fix concurrency/oob crash for album supplementary detail view in audio
group data source
Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
Changes:
=====================================
modules/gui/macosx/library/audio-library/VLCLibraryAudioGroupDataSource.m
=====================================
@@ -252,13 +252,14 @@
viewForSupplementaryElementOfKind:(NSCollectionViewSupplementaryElementKind)kind
atIndexPath:(NSIndexPath *)indexPath
{
if ([kind
isEqualToString:VLCLibraryCollectionViewAlbumSupplementaryDetailViewKind]) {
- if (self.representedListOfAlbums == nil ||
self.representedListOfAlbums.count == 0) {
+ NSArray<VLCMediaLibraryAlbum *> * const albums =
self.representedListOfAlbums;
+ if (albums == nil || albums.count == 0 || indexPath.item >=
albums.count) {
return nil;
}
VLCLibraryCollectionViewAlbumSupplementaryDetailView*
albumSupplementaryDetailView = [collectionView makeSupplementaryViewOfKind:kind
withIdentifier:VLCLibraryCollectionViewAlbumSupplementaryDetailViewKind
forIndexPath:indexPath];
- VLCMediaLibraryAlbum * const album =
self.representedListOfAlbums[indexPath.item];
+ VLCMediaLibraryAlbum * const album = albums[indexPath.item];
VLCLibraryRepresentedItem * const representedItem =
[[VLCLibraryRepresentedItem alloc] initWithItem:album
parentType:_currentParentType];
albumSupplementaryDetailView.representedItem = representedItem;
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/644d434de095fa5c5537b7a88d3a80e9b851b02b
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/644d434de095fa5c5537b7a88d3a80e9b851b02b
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits