From 70467916504f6052869dfdf618e5a677bd0cf366 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 16 Aug 2012 20:25:30 +0000 Subject: - Fix crashes when closing connections while an autorefreshing database process list is using that connection --- Source/SPDatabaseDocument.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Source/SPDatabaseDocument.m') diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 714a58c1..c296fba6 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -5724,8 +5724,11 @@ static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; [prefs removeObserver:tableContentInstance forKeyPath:SPGlobalResultTableFont]; [prefs removeObserver:[SPQueryController sharedQueryController] forKeyPath:SPConsoleEnableLogging]; [prefs removeObserver:self forKeyPath:SPConsoleEnableLogging]; - - if (processListController) [prefs removeObserver:processListController forKeyPath:SPDisplayTableViewVerticalGridlines]; + + if (processListController) { + [processListController close]; + [prefs removeObserver:processListController forKeyPath:SPDisplayTableViewVerticalGridlines]; + } if (serverVariablesController) [prefs removeObserver:serverVariablesController forKeyPath:SPDisplayTableViewVerticalGridlines]; #endif -- cgit v1.2.3