Skip to content

Commit b9a2d6c

Browse files
committed
Fix a rare timing-sensitive crash when closing a window during a connection attempt (part of #2924)
1 parent 6734907 commit b9a2d6c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Source/SPDatabaseDocument.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6534,8 +6534,11 @@ - (void)dealloc
65346534

65356535
if (processListController) [processListController close];
65366536

6537+
// #2924: The connection controller doesn't retain its delegate (us), but it may outlive us (e.g. when running a bg thread)
6538+
[connectionController setDelegate:nil];
6539+
SPClear(connectionController);
6540+
65376541
if (selectedTableName) SPClear(selectedTableName);
6538-
if (connectionController) SPClear(connectionController);
65396542
if (processListController) SPClear(processListController);
65406543
if (serverVariablesController) SPClear(serverVariablesController);
65416544
if (mySQLConnection) SPClear(mySQLConnection);

0 commit comments

Comments
 (0)