diff options
author | Stuart Connolly <stuart02@gmail.com> | 2017-03-30 22:18:49 +0100 |
---|---|---|
committer | Stuart Connolly <stuart02@gmail.com> | 2017-03-30 22:18:49 +0100 |
commit | 63eb8781018c094644bc1d46099b42ad27f51670 (patch) | |
tree | 7306cb550c6a0d966148fc9e5669ac7dd7674a91 /Source | |
parent | 9527a670cf2ea0f05312a09bd4def0721254e0ae (diff) | |
download | sequelpro-63eb8781018c094644bc1d46099b42ad27f51670.tar.gz sequelpro-63eb8781018c094644bc1d46099b42ad27f51670.tar.bz2 sequelpro-63eb8781018c094644bc1d46099b42ad27f51670.zip |
Fix first responder exception being logged on 10.12. Check if the favourites outline view is attached to a window before setting it as the first responder.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPDatabaseDocument.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 6fa097c1..c38aae5a 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -4479,10 +4479,10 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; */ - (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]]; } |