From 1b3414af80cfed72ff9481302bf1eadb45cc9e4c Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 25 Jan 2017 00:11:21 +0200 Subject: [PATCH] Fix the disposing of the mask too soon --- tests/Tests/SKBitmapTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Tests/SKBitmapTest.cs b/tests/Tests/SKBitmapTest.cs index 1211dbcc..b506e393 100644 --- a/tests/Tests/SKBitmapTest.cs +++ b/tests/Tests/SKBitmapTest.cs @@ -110,8 +110,6 @@ namespace SkiaSharp.Tests srcBmp.InstallMaskPixels(mask); - mask.FreeImage(); - pixels = srcBmp.Pixels; Assert.Equal(128, pixels[0].Alpha); Assert.Equal(127, pixels[1].Alpha); @@ -129,6 +127,8 @@ namespace SkiaSharp.Tests Assert.Equal(73, pixels[13].Alpha); Assert.Equal(74, pixels[14].Alpha); Assert.Equal(75, pixels[15].Alpha); + + mask.FreeImage(); } } }