Bug Check: seek handler type check to fix crash
Somebody somehow sent this an NSMenuItem? I don't have any UI handlers calling this IBAction from menus, so someone is messing around with the code and not removing my crash reporter. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
23334dd452
commit
10bfb204b5
1 changed files with 5 additions and 0 deletions
|
@ -379,6 +379,11 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
|||
}
|
||||
|
||||
- (IBAction)seek:(id)sender {
|
||||
if(![sender respondsToSelector:@selector(doubleValue)]) {
|
||||
ALog(@"Someone sent [PlaybackController seek:] a non-seekbar object: %@", sender);
|
||||
return;
|
||||
}
|
||||
|
||||
double time = [sender doubleValue];
|
||||
|
||||
[audioPlayer performSelectorOnMainThread:@selector(seekToTimeBG:) withObjects:@(time), nil];
|
||||
|
|
Loading…
Reference in a new issue