Skip to content

Commit 4074406

Browse files
authored
Correctly compare source and destination pixel format (#12940)
1 parent 9eeb3ee commit 4074406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Avalonia.Base/Media/Imaging/Bitmap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public void CopyPixels(ILockedFramebuffer buffer, AlphaFormat alphaFormat)
241241
throw new NotSupportedException("CopyPixels is not supported for this bitmap type");
242242
}
243243

244-
if (readable.Format != Format || readable.AlphaFormat != alphaFormat)
244+
if (buffer.Format != readable.Format || alphaFormat != readable.AlphaFormat)
245245
{
246246
using (var fb = readable.Lock())
247247
{

0 commit comments

Comments
 (0)