aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPQueryFavoriteManager.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-06-29 21:48:08 +0200
committerMax <post@wickenrode.com>2015-06-29 21:48:08 +0200
commit12cca5f3cb1b27180512f0ed7a2ced63b81a58d7 (patch)
treec097cc9cc391a53ee032a6b360dde68a0ecbcb94 /Source/SPQueryFavoriteManager.m
parent0bfc0776d1d66f3eb8ac3eb21a8868e095c1c5e6 (diff)
downloadsequelpro-12cca5f3cb1b27180512f0ed7a2ced63b81a58d7.tar.gz
sequelpro-12cca5f3cb1b27180512f0ed7a2ced63b81a58d7.tar.bz2
sequelpro-12cca5f3cb1b27180512f0ed7a2ced63b81a58d7.zip
Removing a query favorite via its context menu would cause an exception (fixes #2161)
Diffstat (limited to 'Source/SPQueryFavoriteManager.m')
-rw-r--r--Source/SPQueryFavoriteManager.m5
1 files 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")