diff options
author | Max <post@wickenrode.com> | 2017-11-17 17:26:13 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2017-11-17 17:26:13 +0100 |
commit | b9a2d6c138a477092ea63b209ed00f8bf47e331b (patch) | |
tree | 22cbbb7a6c4dfda9727634be632923111e3a105e /Source | |
parent | 6734907374aef150f53e65b81f0fc2b43a8a54f7 (diff) | |
download | sequelpro-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.m | 5 |
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); |