Skip to content

Commit

Permalink
Silence a crash in TQueryTab.TimerStatusUpdateOnTimer, probably happe…
Browse files Browse the repository at this point in the history
…ning when accessing the no longer running thread. See https://www.heidisql.com/forum.php?t=25418#p25484
  • Loading branch information
ansgarbecker committed Sep 30, 2018
1 parent e2ff578 commit 1b6c813
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/main.pas
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12677,7 +12677,12 @@ procedure TQueryTab.TimerStatusUpdateOnTimer(Sender: TObject);
Msg := f_('queries #%s to #%s', [FormatNumber(ExecutionThread.BatchPosition+1), FormatNumber(ExecutionThread.BatchPosition+ExecutionThread.QueriesInPacket)]); Msg := f_('queries #%s to #%s', [FormatNumber(ExecutionThread.BatchPosition+1), FormatNumber(ExecutionThread.BatchPosition+ExecutionThread.QueriesInPacket)]);
Elapsed := MilliSecondsBetween(ExecutionThread.QueryStartedAt, Now); Elapsed := MilliSecondsBetween(ExecutionThread.QueryStartedAt, Now);
ElapsedMsg := FormatTimeNumber(Elapsed/1000, True); ElapsedMsg := FormatTimeNumber(Elapsed/1000, True);
MainForm.ShowStatusMsg(ElapsedMsg + ': ' + f_('Executing %s of %s ...', [Msg, FormatNumber(ExecutionThread.Batch.Count)])); try
MainForm.ShowStatusMsg(ElapsedMsg + ': ' + f_('Executing %s of %s ...', [Msg, FormatNumber(ExecutionThread.Batch.Count)]));
except;
// Some crashes here, probably when accessing the no longer running thread.
// See https://www.heidisql.com/forum.php?t=25418#p25484
end;
end; end;




Expand Down

0 comments on commit 1b6c813

Please sign in to comment.