From 10bfb204b59566197fc639b0f07a29b54d702170 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Thu, 12 Jun 2025 19:51:45 -0700 Subject: [PATCH] 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 --- Application/PlaybackController.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Application/PlaybackController.m b/Application/PlaybackController.m index b7dd135a4..bd001438b 100644 --- a/Application/PlaybackController.m +++ b/Application/PlaybackController.m @@ -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];