diff options
Diffstat (limited to 'TableDocument.m')
-rw-r--r-- | TableDocument.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/TableDocument.m b/TableDocument.m index a7f33ea8..ec42b1a6 100644 --- a/TableDocument.m +++ b/TableDocument.m @@ -239,6 +239,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa - (IBAction)cancelConnectSheet:(id)sender { [NSApp endSheet:connectSheet]; + [tableWindow close]; } - (IBAction)closeSheet:(id)sender @@ -1442,7 +1443,7 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa - (void)windowWillClose:(NSNotification *)aNotification { - [self closeConnection]; + if ([mySQLConnection isConnected]) [self closeConnection]; [[NSNotificationCenter defaultCenter] removeObserver:self]; } |