aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2017-11-17 17:26:13 +0100
committerMax <post@wickenrode.com>2017-11-17 17:26:13 +0100
commitb9a2d6c138a477092ea63b209ed00f8bf47e331b (patch)
tree22cbbb7a6c4dfda9727634be632923111e3a105e /Source
parent6734907374aef150f53e65b81f0fc2b43a8a54f7 (diff)
downloadsequelpro-b9a2d6c138a477092ea63b209ed00f8bf47e331b.tar.gz
sequelpro-b9a2d6c138a477092ea63b209ed00f8bf47e331b.tar.bz2
sequelpro-b9a2d6c138a477092ea63b209ed00f8bf47e331b.zip
Fix a rare timing-sensitive crash when closing a window during a connection attempt (part of #2924)
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDatabaseDocument.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 2581967c..6091ed3b 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -6534,8 +6534,11 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0;
if (processListController) [processListController close];
+ // #2924: The connection controller doesn't retain its delegate (us), but it may outlive us (e.g. when running a bg thread)
+ [connectionController setDelegate:nil];
+ SPClear(connectionController);
+
if (selectedTableName) SPClear(selectedTableName);
- if (connectionController) SPClear(connectionController);
if (processListController) SPClear(processListController);
if (serverVariablesController) SPClear(serverVariablesController);
if (mySQLConnection) SPClear(mySQLConnection);