mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Fix sporadic crash in Tconnform.TimerStatisticsTimer due to empty session path
This commit is contained in:
@@ -633,8 +633,12 @@ function Tconnform.SelectedSessionPath: String;
|
||||
var
|
||||
Sess: PConnectionParameters;
|
||||
begin
|
||||
Sess := ListSessions.GetNodeData(ListSessions.FocusedNode);
|
||||
Result := Sess.SessionPath;
|
||||
if not Assigned(ListSessions.FocusedNode) then
|
||||
Result := ''
|
||||
else begin
|
||||
Sess := ListSessions.GetNodeData(ListSessions.FocusedNode);
|
||||
Result := Sess.SessionPath;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@@ -1010,6 +1014,9 @@ begin
|
||||
Exit;
|
||||
|
||||
AppSettings.SessionPath := SelectedSessionPath;
|
||||
if AppSettings.SessionPath.IsEmpty then
|
||||
Exit;
|
||||
|
||||
DummyDate := StrToDateTime('2000-01-01');
|
||||
LastConnect := StrToDateTimeDef(AppSettings.ReadString(asLastConnect), DummyDate);
|
||||
if LastConnect <> DummyDate then begin
|
||||
|
||||
Reference in New Issue
Block a user