LazMapViewer: Avoid new cache-downloadengine to hang when cache file does not exist.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9490 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2024-10-22 15:32:25 +00:00
parent b6619dd30e
commit a204dfcd7a

View File

@ -500,7 +500,10 @@ begin
try
try
FDownloadEngine.DownloadFile(Url, lStream);
if Assigned(Cache) and (lStream.Size > 0) then
if (lStream.Size = 0) then
Job.Cancel
else
if Assigned(Cache) then
Cache.Add(MapO, Id, lStream);
except
end;