Skip to content

Commit

Permalink
Correctly compare source and destination pixel format (#12940)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gillibald authored and maxkatz6 committed Feb 8, 2024
1 parent b0f6313 commit 84e2fa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Avalonia.Base/Media/Imaging/Bitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public void CopyPixels(ILockedFramebuffer buffer, AlphaFormat alphaFormat)
throw new NotSupportedException("CopyPixels is not supported for this bitmap type");
}

if (readable.Format != Format || readable.AlphaFormat != alphaFormat)
if (buffer.Format != readable.Format || alphaFormat != readable.AlphaFormat)
{
using (var fb = readable.Lock())
{
Expand Down

0 comments on commit 84e2fa9

Please sign in to comment.