From 3b39f3bdd7e0f54de8f45623f1ae980729491cbe Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 29 Jun 2015 21:48:08 +0200 Subject: Removing a query favorite via its context menu would cause an exception (fixes #2161) --- Source/SPQueryFavoriteManager.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m index a715bd93..3738fe0d 100644 --- a/Source/SPQueryFavoriteManager.m +++ b/Source/SPQueryFavoriteManager.m @@ -255,9 +255,10 @@ */ - (IBAction)removeQueryFavorite:(id)sender { - + //sender can be a NSButton or a NSMenuItem + // Complete editing in the window - [[sender window] makeFirstResponder:[sender window]]; + [[self window] makeFirstResponder:[self window]]; NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove selected query favorites?", @"remove selected query favorites message") defaultButton:NSLocalizedString(@"Remove", @"remove button") -- cgit v1.2.3