From 5280cd3aa3f52dfca8f42cf72b71105ab7b5e0f6 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sat, 16 Jul 2022 06:07:53 -0700 Subject: [PATCH] [Playlist Pasteboard] Rewrite row pasteboard Playlist View pasteboard copier function should only be generating URLs, and it should verify that the entry has a valid URL to begin with. Signed-off-by: Christopher Snowhill --- Playlist/PlaylistController.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index 1bf0d50e0..018d30543 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -717,11 +717,11 @@ static void *playlistControllerContext = &playlistControllerContext; item = [[NSPasteboardItem alloc] init]; } - NSMutableArray *filenames = [NSMutableArray array]; PlaylistEntry *song = [[self arrangedObjects] objectAtIndex:row]; - [filenames addObject:[[song path] stringByExpandingTildeInPath]]; - [item setData:[song.url dataRepresentation] forType:NSPasteboardTypeFileURL]; + if(song.url != nil) { + [item setData:[song.url dataRepresentation] forType:NSPasteboardTypeFileURL]; + } return item; }