mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Connection object may have been destroyed when accessing Mainform.ActiveDatabase. Fixes issue #2407.
This commit is contained in:
@@ -5550,7 +5550,9 @@ function TMainForm.GetActiveDatabase: String;
|
||||
begin
|
||||
// Find currently selected database in active connection
|
||||
Result := '';
|
||||
if (not (csDestroying in ComponentState)) and Assigned(FActiveDBObj) then
|
||||
if (not (csDestroying in ComponentState))
|
||||
and Assigned(FActiveDBObj)
|
||||
and Assigned(FActiveDBObj.Connection) then
|
||||
Result := FActiveDBObj.Connection.Database;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user