mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Disconnect from server must be the last thing to do in FormClose, as other (repaint) actions can implicitly trigger some database query. Fixes issue #1780.
This commit is contained in:
@@ -1141,9 +1141,6 @@ begin
|
||||
FreeAndNil(CreateDatabaseForm);
|
||||
FreeAndNil(SearchReplaceDialog);
|
||||
|
||||
// Close database connection
|
||||
DoDisconnect;
|
||||
|
||||
OpenRegistry;
|
||||
// Position of Toolbars
|
||||
MainReg.WriteInteger(REGNAME_TOOLBAR2LEFT, ToolBarStandard.Left);
|
||||
@@ -1194,6 +1191,10 @@ begin
|
||||
MainReg.CloseKey;
|
||||
MainReg.Free;
|
||||
end;
|
||||
|
||||
// Close database connection at the very end, otherwise above stuff can implicitely
|
||||
// trigger some database query, e.g. DBtree.GetText
|
||||
DoDisconnect;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user