From b77a29b4e1c900bca9ef0f41ed1d8c17f28db943 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Mon, 5 Feb 2024 16:59:00 +0100 Subject: [PATCH] Update ImageFileCache.cs --- MapControl/Shared/ImageFileCache.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MapControl/Shared/ImageFileCache.cs b/MapControl/Shared/ImageFileCache.cs index 59e0aa61..33ff71c3 100644 --- a/MapControl/Shared/ImageFileCache.cs +++ b/MapControl/Shared/ImageFileCache.cs @@ -93,13 +93,13 @@ namespace MapControl.Caching { var buffer = await memoryCache.GetAsync(key, token).ConfigureAwait(false); - if (buffer == null && !token.IsCancellationRequested) + if (buffer == null) { var path = GetPath(key); try { - if (path != null && File.Exists(path)) + if (path != null && File.Exists(path) && !token.IsCancellationRequested) { buffer = await ReadAllBytesAsync(path).ConfigureAwait(false);