From 8da004d3e348738a04a366ce5079a576d260c419 Mon Sep 17 00:00:00 2001 From: Benjamin Hess Date: Sat, 31 Mar 2012 19:11:16 +0800 Subject: [PATCH] fixed bug on exit: dispose already nulled textures --- Vocaluxe/Lib/Draw/CDirect3D.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Lib/Draw/CDirect3D.cs b/Vocaluxe/Lib/Draw/CDirect3D.cs index a37722fa..2640ad0a 100644 --- a/Vocaluxe/Lib/Draw/CDirect3D.cs +++ b/Vocaluxe/Lib/Draw/CDirect3D.cs @@ -594,7 +594,10 @@ namespace Vocaluxe.Lib.Draw //Dispose all textures foreach (KeyValuePair p in _D3DTextures) { - p.Value.Dispose(); + if (p.Value != null) + { + p.Value.Dispose(); + } } TexturedColoredVertex.GetDeclaration(_Device).Dispose();