[Console] Use try/except SEH

This commit is contained in:
momo5502 2017-07-14 11:36:37 +02:00
parent 7d55ee2633
commit e4ff3113ea

View File

@ -246,7 +246,7 @@ namespace Components
void Console::Destroy() void Console::Destroy()
{ {
try __try
{ {
delwin(Console::OutputWindow); delwin(Console::OutputWindow);
delwin(Console::InputWindow); delwin(Console::InputWindow);
@ -254,10 +254,7 @@ namespace Components
endwin(); endwin();
delscreen(SP); delscreen(SP);
} }
catch (...) __finally {}
{
OutputDebugStringA("Failed to free PDCurses screen\n");
}
Console::OutputWindow = nullptr; Console::OutputWindow = nullptr;
Console::InputWindow = nullptr; Console::InputWindow = nullptr;