From cad400db1e656e1594e7f17c8392fc4a5d73d477 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 4 Apr 2011 17:09:43 +0000 Subject: [PATCH] Try to fix a further randomly occurring access violation, probably in conjunction with threads. See http://www.heidisql.com/forum.php?t=8096 --- source/main.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/main.pas b/source/main.pas index 0e30aeab..6536e976 100644 --- a/source/main.pas +++ b/source/main.pas @@ -4827,10 +4827,13 @@ end; procedure TMainForm.TimerHostUptimeTimer(Sender: TObject); +var + Conn: TDBConnection; begin // Display server uptime - if Assigned(ActiveConnection) then - ShowStatusMsg('Uptime: '+FormatTimeNumber(ActiveConnection.ServerUptime), 4) + Conn := ActiveConnection; + if Assigned(Conn) then + ShowStatusMsg('Uptime: '+FormatTimeNumber(Conn.ServerUptime), 4) else ShowStatusMsg('', 4); end;