From 1693da093b3cb33644d0e42c39ba20470a5a6143 Mon Sep 17 00:00:00 2001 From: Matthias Husinsky Date: Wed, 30 Dec 2015 10:15:14 +0100 Subject: [PATCH] Fix for exception on deletion of DynamicTexture2DColorNode --- .../Nodes/Textures/2D/DynamicTexture2DColorNode.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Nodes/VVVV.DX11.Nodes/Nodes/Textures/2D/DynamicTexture2DColorNode.cs b/Nodes/VVVV.DX11.Nodes/Nodes/Textures/2D/DynamicTexture2DColorNode.cs index b96182f4..c2157882 100644 --- a/Nodes/VVVV.DX11.Nodes/Nodes/Textures/2D/DynamicTexture2DColorNode.cs +++ b/Nodes/VVVV.DX11.Nodes/Nodes/Textures/2D/DynamicTexture2DColorNode.cs @@ -119,7 +119,13 @@ public void Destroy(IPluginIO pin, DX11RenderContext context, bool force) #region IDisposable Members public void Dispose() { - this.FTextureOutput[0].Dispose(); + if (this.FTextureOutput.SliceCount > 0) + { + if (this.FTextureOutput[0] != null) + { + this.FTextureOutput[0].Dispose(); + } + } } #endregion }