[Notifications] Prevent crash on deleted tracks
Prevent an unhandled exception when a notification is sent on a track which has been deleted from the playlist. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
8db2e41049
commit
02d2ab01a7
|
@ -112,7 +112,7 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
|
|||
|
||||
- (NSDictionary *)fillNotificationDictionary:(PlaylistEntry *)pe status:(TrackStatus)status {
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
if(pe == nil) return dict;
|
||||
if(pe == nil || pe.deleted || [pe URL] == nil) return dict;
|
||||
|
||||
[dict setObject:[[pe URL] absoluteString] forKey:TrackPath];
|
||||
if([pe title]) [dict setObject:[pe title] forKey:TrackTitle];
|
||||
|
|
Loading…
Reference in New Issue