diff --git a/src/Eto.Mac/ColorizeView.cs b/src/Eto.Mac/ColorizeView.cs index 0cb13ee2c..be4f0aa5c 100644 --- a/src/Eto.Mac/ColorizeView.cs +++ b/src/Eto.Mac/ColorizeView.cs @@ -28,14 +28,14 @@ public void Begin(CGRect frame, NSView controlView) var size = controlView.Frame.Size; if (size.Width <= 0 || size.Height <= 0) { + _image?.Dispose(); + _image = null; return; } if (_image == null || size != _image.Size) { - if (_image != null) - _image.Dispose(); - + _image?.Dispose(); _image = new NSImage(size); }