diff options
author | rowanbeentje <rowan@beent.je> | 2012-05-19 15:29:27 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-05-19 15:29:27 +0000 |
commit | 1975d6df453a7b82346571ac8d45613c1bffce15 (patch) | |
tree | 46878554f5ee81576b6a526bf52e942d509638ae /Source/SPConnectionController.m | |
parent | 810cc01cfce1eec4d305d35dfd83fe508b099313 (diff) | |
download | sequelpro-1975d6df453a7b82346571ac8d45613c1bffce15.tar.gz sequelpro-1975d6df453a7b82346571ac8d45613c1bffce15.tar.bz2 sequelpro-1975d6df453a7b82346571ac8d45613c1bffce15.zip |
- Clean up connection delegate on connection view close, addressing crashes when closing windows where connections are failing
Diffstat (limited to 'Source/SPConnectionController.m')
-rw-r--r-- | Source/SPConnectionController.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 2af457ec..7eb15dd6 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -1509,7 +1509,10 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [nibObjectsToRelease release]; - if (mySQLConnection) [mySQLConnection release]; + if (mySQLConnection) { + [mySQLConnection setDelegate:nil]; + [mySQLConnection release]; + } if (sshTunnel) [sshTunnel setConnectionStateChangeSelector:nil delegate:nil], [sshTunnel disconnect], [sshTunnel release]; if (connectionKeychainID) [connectionKeychainID release]; |