From e4ff3113ea60eb54ab28833e0d8850ea6ced364c Mon Sep 17 00:00:00 2001 From: momo5502 Date: Fri, 14 Jul 2017 11:36:37 +0200 Subject: [PATCH] [Console] Use try/except SEH --- src/Components/Modules/Console.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Components/Modules/Console.cpp b/src/Components/Modules/Console.cpp index a18eaa97..8f73bf1d 100644 --- a/src/Components/Modules/Console.cpp +++ b/src/Components/Modules/Console.cpp @@ -246,7 +246,7 @@ namespace Components void Console::Destroy() { - try + __try { delwin(Console::OutputWindow); delwin(Console::InputWindow); @@ -254,10 +254,7 @@ namespace Components endwin(); delscreen(SP); } - catch (...) - { - OutputDebugStringA("Failed to free PDCurses screen\n"); - } + __finally {} Console::OutputWindow = nullptr; Console::InputWindow = nullptr;