aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStuart Connolly <stuart02@gmail.com>2017-03-30 22:18:49 +0100
committerStuart Connolly <stuart02@gmail.com>2017-03-30 22:18:49 +0100
commit63eb8781018c094644bc1d46099b42ad27f51670 (patch)
tree7306cb550c6a0d966148fc9e5669ac7dd7674a91
parent9527a670cf2ea0f05312a09bd4def0721254e0ae (diff)
downloadsequelpro-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.
-rw-r--r--Source/SPDatabaseDocument.m4
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]];
}