From a0761a41c928de8cb7eb6614292dd4b051342164 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 17 Jun 2022 10:25:27 -0700 Subject: [PATCH] [Playlist Metadata] Safety check for deletion Apply a safety check in case the update comes for a deleted track. Signed-off-by: Christopher Snowhill --- Playlist/PlaylistView.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Playlist/PlaylistView.m b/Playlist/PlaylistView.m index 7ba0f7fe4..b0cb1d13e 100644 --- a/Playlist/PlaylistView.m +++ b/Playlist/PlaylistView.m @@ -416,8 +416,10 @@ - (IBAction)refreshTrack:(id)sender { PlaylistEntry *pe = (PlaylistEntry *)sender; - unsigned long columns = [[self tableColumns] count]; - [self reloadDataForRowIndexes:[NSIndexSet indexSetWithIndex:[pe index]] columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]]; + if(pe && !pe.deLeted) { + unsigned long columns = [[self tableColumns] count]; + [self reloadDataForRowIndexes:[NSIndexSet indexSetWithIndex:pe.index] columnIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, columns)]]; + } } #if 0