Image buffer null and length check

This commit is contained in:
ClemensFischer 2025-09-01 12:04:36 +02:00
parent ec53c50c67
commit 7846f4f685
2 changed files with 2 additions and 3 deletions

View file

@ -173,7 +173,7 @@ namespace MapControl
{
var buffer = await LoadCachedBuffer(tile, uri, cacheName).ConfigureAwait(false);
if (buffer != null && buffer.Length > 0)
if (buffer?.Length > 0)
{
Task<ImageSource> LoadImage() => tileSource.LoadImageAsync(buffer);