fixed bug on exit: dispose already nulled textures

This commit is contained in:
Benjamin Hess authored and Alexander Eckart committed 2012-03-31 19:25:22 +08:00
1 parent ed5e5bf0b6
commit 8da004d3e3
1 file changed
+4 -1
+4 -1
View File
@@ -594,7 +594,10 @@ namespace Vocaluxe.Lib.Draw
//Dispose all textures
foreach (KeyValuePair<int, Texture> p in _D3DTextures)
{
p.Value.Dispose();
if (p.Value != null)
{
p.Value.Dispose();
}
}
TexturedColoredVertex.GetDeclaration(_Device).Dispose();