LazMapViewer: Add missing GPSItems.Lock/Unlock to DrawTrack method.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8108 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-09-30 22:18:20 +00:00
parent ca72aa00be
commit 2388ef8a3d

View File

@ -616,8 +616,11 @@ var
trkColor: TColor; trkColor: TColor;
trkWidth: Integer; trkWidth: Integer;
begin begin
if trk.Visible and (trk.Points.Count > 0) then if not trk.Visible or (trk.Points.Count = 0) then
begin exit;
GPSItems.Lock;
try
// Determine track color // Determine track color
if trk.LineColor = clDefault then if trk.LineColor = clDefault then
begin begin
@ -657,6 +660,8 @@ begin
LastInside := IsInside; LastInside := IsInside;
end; end;
end; end;
finally
GPSItems.Unlock;
end; end;
end; end;