mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed an AccessViolationException when moving devices in the surface
This commit is contained in:
parent
969e0d3e82
commit
563e36930f
@ -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