Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix first responder exception being logged on 10.12. Check if the fav…
…ourites outline view is attached to a window before setting it as the first responder.
  • Loading branch information
stuconnolly committed Mar 30, 2017
1 parent 9527a67 commit 63eb878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/SPDatabaseDocument.m
Expand Up @@ -4479,10 +4479,10 @@ - (void)tabDidResize
*/
- (void)setParentWindow:(NSWindow *)window
{
NSWindow *outlineViewWindow = [(NSView *)[connectionController favoritesOutlineView] window];
NSWindow *favoritesOutlineViewWindow = [(NSView *)[connectionController favoritesOutlineView] window];

// If the window is being set for the first time - connection controller is visible - update focus
if (!parentWindow && !mySQLConnection && window == outlineViewWindow) {
if (!parentWindow && !mySQLConnection && window == favoritesOutlineViewWindow) {
[window makeFirstResponder:(NSResponder *)[connectionController favoritesOutlineView]];
}

Expand Down

0 comments on commit 63eb878

Please sign in to comment.