From 9675cf2ecbce5d475324e0dde7472ce8e5085aa7 Mon Sep 17 00:00:00 2001 From: Marshall Lerner Date: Mon, 13 Mar 2023 14:47:01 -0400 Subject: [PATCH] Only null out the nsimage when disposing is true --- Xwt.XamMac/Xwt.Mac/ImageViewBackend.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Xwt.XamMac/Xwt.Mac/ImageViewBackend.cs b/Xwt.XamMac/Xwt.Mac/ImageViewBackend.cs index 6d207ac2..fc55956d 100644 --- a/Xwt.XamMac/Xwt.Mac/ImageViewBackend.cs +++ b/Xwt.XamMac/Xwt.Mac/ImageViewBackend.cs @@ -70,7 +70,9 @@ namespace Xwt.Mac protected override void Dispose (bool disposing) { - nsImage = null; + if (disposing) + nsImage = null; + base.Dispose(disposing); } }