aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-03-18 01:29:17 +0000
committerrowanbeentje <rowan@beent.je>2010-03-18 01:29:17 +0000
commit48f80fe6342b14913ffbebf5449895ff9d5e9af8 (patch)
tree5b98ec4570c28cc209a4ec701cb9e1aded7ac9d3 /Source/CustomQuery.m
parenta8dc3ac2af642fb59c8fbed12c3a28038ef3a175 (diff)
downloadsequelpro-48f80fe6342b14913ffbebf5449895ff9d5e9af8.tar.gz
sequelpro-48f80fe6342b14913ffbebf5449895ff9d5e9af8.tar.bz2
sequelpro-48f80fe6342b14913ffbebf5449895ff9d5e9af8.zip
- Fix a couple of calls which crashed if the window had already been closed, fixing window close on query startup or after queries; this fixes http://log.sequelpro.com/view/9
- Fix an exception caused in the NavigatorController if the dbstructure has not been fetched yet
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 35338463..d0553f27 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -2806,6 +2806,10 @@
*/
- (void)historyItemsHaveBeenUpdated:(id)manager
{
+
+ // Abort if the connection has been closed already - sign of a closed window
+ if (![mySQLConnection isConnected]) return;
+
// Refresh history popup menu
NSMenu* historyMenu = [queryHistoryButton menu];
while([queryHistoryButton numberOfItems] > 7)