Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2019-09-29 21:42:02 +0300
committerHarley Acheson <harley.acheson@gmail.com>2019-09-29 21:43:24 +0300
commit3a3e5fb365bac2f3ee653c446215727d9e339648 (patch)
treea12a98dac6b5aea2f31477ad97256b29b7a64add /source/creator/creator_signals.c
parent98c0d16da53ab45d1927b90429b45a558398cbf2 (diff)
Fix T69935: Silence Win32 OS Error Dialogs
Call SetErrorMode() at startup to prevent error mode dialogs. Differential Revision: https://developer.blender.org/D5941 Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/creator/creator_signals.c')
-rw-r--r--source/creator/creator_signals.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
index 5a5bc74d2d3..e8c6e9251bc 100644
--- a/source/creator/creator_signals.c
+++ b/source/creator/creator_signals.c
@@ -301,6 +301,12 @@ void main_signal_setup(void)
# endif
}
+# ifdef WIN32
+ /* Prevent any error mode dialogs from hanging the application. */
+ SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX |
+ SEM_NOOPENFILEERRORBOX);
+# endif
+
if (app_state.signal.use_abort_handler) {
signal(SIGABRT, sig_handle_abort);
}