mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Merge pull request #503 from diogotr7/fix-debug-bitmap
Fixed an AccessViolationException when moving devices in the surface
This commit is contained in:
commit
af52f467df
@ -55,7 +55,11 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
if (e.BitmapBrush?.Bitmap == null || e.BitmapBrush.Bitmap.Pixels.Length == 0)
|
||||
return;
|
||||
|
||||
if (!(CurrentFrame is WriteableBitmap writeableBitmap))
|
||||
var bitmapInfo = e.BitmapBrush.Bitmap.Info;
|
||||
|
||||
if (!(CurrentFrame is WriteableBitmap writeableBitmap) ||
|
||||
writeableBitmap.Width != bitmapInfo.Width ||
|
||||
writeableBitmap.Height != bitmapInfo.Height)
|
||||
{
|
||||
CurrentFrame = e.BitmapBrush.Bitmap.ToWriteableBitmap();
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user