From 8138dbab6d6a5590576e7015e16ebf57f39084e7 Mon Sep 17 00:00:00 2001 From: Alexey Shikov Date: Thu, 3 Sep 2020 19:54:26 +0300 Subject: [PATCH] Fix an exception when loading bitmap on Android from file --- .../Platforms/Android/Bitmaps/PlatformBitmapLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Splat.Drawing/Platforms/Android/Bitmaps/PlatformBitmapLoader.cs b/src/Splat.Drawing/Platforms/Android/Bitmaps/PlatformBitmapLoader.cs index 6eac2493b..8ae6d0722 100644 --- a/src/Splat.Drawing/Platforms/Android/Bitmaps/PlatformBitmapLoader.cs +++ b/src/Splat.Drawing/Platforms/Android/Bitmaps/PlatformBitmapLoader.cs @@ -210,7 +210,7 @@ private static bool HasCorrectStreamEnd(Stream sourceStream) private void AttemptStreamByteCorrection(Stream sourceStream) { - if (sourceStream.CanWrite) + if (!sourceStream.CanWrite) { this.Log().Warn("Stream missing terminating bytes but is read only."); }