Fixed Bug with window not closing after error

This commit is contained in:
Flamefire committed 2013-04-28 17:30:11 +02:00
1 parent 5172f17da7
commit 34c75ec7c5
4 files changed
+16 -1

No files matched your search

+5
View File
@@ -582,6 +582,11 @@ namespace Vocaluxe.Lib.Draw
/// <returns></returns>
public bool Unload()
{
try
{
Close();
}
catch {}
//Dispose all textures
foreach (KeyValuePair<int, Texture> p in _D3DTextures)
{
+5
View File
@@ -267,6 +267,11 @@ namespace Vocaluxe.Lib.Draw
public bool Unload()
{
try
{
Close();
}
catch {}
Dispose();
return true;
}
+5
View File
@@ -440,6 +440,11 @@ namespace Vocaluxe.Lib.Draw
public bool Unload()
{
try
{
Close();
}
catch {}
STexture[] textures = new STexture[_Textures.Count];
_Textures.Values.CopyTo(textures, 0);
for (int i = 0; i < _Textures.Count; i++)