[Now Playing Spam] Don't crash if nothing playing

Don't crash on now playing spam hotkey if no track is currently playing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-19 00:20:40 -07:00
parent c2388d2659
commit cd14377dcd
1 changed files with 6 additions and 3 deletions

View File

@ -285,11 +285,14 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
} }
- (IBAction)spam:(id)sender { - (IBAction)spam:(id)sender {
NSPasteboard *pboard = [NSPasteboard generalPasteboard]; PlaylistEntry *pe = [playlistController currentEntry];
if(pe) {
NSPasteboard *pboard = [NSPasteboard generalPasteboard];
[pboard clearContents]; [pboard clearContents];
[pboard writeObjects:@[[[playlistController currentEntry] spam]]]; [pboard writeObjects:@[[pe spam]]];
}
} }
- (IBAction)eventSeekForward:(id)sender { - (IBAction)eventSeekForward:(id)sender {