aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-06-29 21:48:08 +0200
committerMax <post@wickenrode.com>2015-06-29 21:57:53 +0200
commit3b39f3bdd7e0f54de8f45623f1ae980729491cbe (patch)
treebdfd94144a890b31b1b0311acc8da49c1734bdb7
parentc5aab2d4ce9ff8b00acbbfc71aab35b6e43589dd (diff)
downloadsequelpro-3b39f3bdd7e0f54de8f45623f1ae980729491cbe.tar.gz
sequelpro-3b39f3bdd7e0f54de8f45623f1ae980729491cbe.tar.bz2
sequelpro-3b39f3bdd7e0f54de8f45623f1ae980729491cbe.zip
Removing a query favorite via its context menu would cause an exception (fixes #2161)
-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")