Close game window on error (mentioned in #570)

Otherwise, the error doesn't show up and the game appears to freeze in fullscreen mode
master
krzys-h 2015-08-19 11:14:25 +02:00
parent 8421189716
commit 9d6543a947
1 changed files with 6 additions and 0 deletions

View File

@ -97,6 +97,12 @@ void CSignalHandlers::ReportError(const std::string& errorMessage)
{
static bool triedSaving = false;
if (SDL_WasInit(SDL_INIT_VIDEO))
{
// Close the SDL window on crash, because otherwise the error doesn't show on in fullscreen mode and the game appears to freeze
SDL_Quit();
}
std::stringstream msg;
msg << "Unhandled exception occured!" << std::endl;
msg << "==============================" << std::endl;