From dce1142bacb846c69ba1f6267c574266b5c1aa89 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Mon, 25 Sep 2017 21:19:29 +0200 Subject: [PATCH] Fixed a huge memory leak This was caused by a huge design-fail and needs some serious rethinking/rework --- RGB.NET.Core/RGBSurface.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RGB.NET.Core/RGBSurface.cs b/RGB.NET.Core/RGBSurface.cs index aa78480..e91dcfa 100644 --- a/RGB.NET.Core/RGBSurface.cs +++ b/RGB.NET.Core/RGBSurface.cs @@ -148,8 +148,8 @@ namespace RGB.NET.Core private Rectangle GetDeviceLedLocation(Led led, Point extraOffset = null) { return extraOffset != null - ? new Rectangle(led.LedRectangle.Location + led.Device.Location + extraOffset, led.LedRectangle.Size) - : new Rectangle(led.LedRectangle.Location + led.Device.Location, led.LedRectangle.Size); + ? new Rectangle(led.LedRectangle.Location + led.Device.Location + extraOffset, new Size(led.LedRectangle.Size.Width, led.LedRectangle.Size.Height)) + : new Rectangle(led.LedRectangle.Location + led.Device.Location, new Size(led.LedRectangle.Size.Width, led.LedRectangle.Size.Height)); } ///