Crash handler does not pop up window in batch mode now.

This commit is contained in:
klayoutmatthias 2017-11-01 22:10:23 +01:00
parent 5d9513b6a5
commit ccf6570d46
1 changed files with 22 additions and 12 deletions

View File

@ -216,6 +216,9 @@ LONG WINAPI ExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo)
SymCleanup (process);
bool has_gui = lay::Application::instance () && lay::Application::instance ()->has_gui ();
if (has_gui) {
// YES! I! KNOW!
// In a signal handler you shall not do fancy stuff (in particular not
// open dialogs) nor shall you throw exceptions! But that scheme appears to
@ -231,6 +234,13 @@ LONG WINAPI ExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo)
} else {
throw tl::CancelException ();
}
} else {
tl::error << text << tl::noendl;
return EXCEPTION_EXECUTE_HANDLER;
}
}
static void handle_signal (int signo)