[vlc-commits] [Git][videolan/vlc][master] macosx: fix crash when selecting deleted playlist row in table view

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed May 20 19:04:23 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
31367f0c by Serhii Bykov at 2026-05-20T18:52:58+00:00
macosx: fix crash when selecting deleted playlist row in table view

- - - - -


1 changed file:

- modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistDataSource.m


Changes:

=====================================
modules/gui/macosx/library/playlist-library/VLCLibraryPlaylistDataSource.m
=====================================
@@ -142,6 +142,20 @@ typedef NS_ENUM(NSInteger, VLCLibraryDataSourceCacheAction) {
 - (void)reloadViewsAtIndex:(NSUInteger)index
           dueToCacheAction:(VLCLibraryDataSourceCacheAction)action
 {
+    NSIndexSet * const indexSet = [NSIndexSet indexSetWithIndex:index];
+    switch (action) {
+        case VLCLibraryDataSourceCacheUpdateAction:
+            [self.masterTableView reloadDataForRowIndexes:indexSet
+                                            columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, self.masterTableView.numberOfColumns)]];
+            break;
+        case VLCLibraryDataSourceCacheDeleteAction:
+            [self.masterTableView removeRowsAtIndexes:indexSet
+                                       withAnimation:NSTableViewAnimationEffectNone];
+            break;
+        default:
+            NSAssert(false, @"Invalid playlist cache action");
+    }
+
     NSIndexPath * const indexPath = [NSIndexPath indexPathForItem:index inSection:0];
     NSSet<NSIndexPath *> * const indexPathSet = [NSSet setWithObject:indexPath];
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/31367f0c9c3f2bd0f63469d24ca17f44aab72b0f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/31367f0c9c3f2bd0f63469d24ca17f44aab72b0f
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list