Skip to content

Commit 12cca5f

Browse files
committed
Removing a query favorite via its context menu would cause an exception (fixes #2161)
1 parent 0bfc077 commit 12cca5f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/SPQueryFavoriteManager.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,10 @@ - (IBAction)duplicateQueryFavorite:(id)sender
255255
*/
256256
- (IBAction)removeQueryFavorite:(id)sender
257257
{
258-
258+
//sender can be a NSButton or a NSMenuItem
259+
259260
// Complete editing in the window
260-
[[sender window] makeFirstResponder:[sender window]];
261+
[[self window] makeFirstResponder:[self window]];
261262

262263
NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Remove selected query favorites?", @"remove selected query favorites message")
263264
defaultButton:NSLocalizedString(@"Remove", @"remove button")

0 commit comments

Comments
 (0)