diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2014-01-07 23:17:44 +1100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-31 19:07:07 +0100 |
commit | 2065e0ba3635afe575977c02c1efbbd62e9891bc (patch) | |
tree | 5ebaa28dba42fda4fd1eba6bf329c522f73e5f6d | |
parent | 3c43a022aff902115f86cec3381ce6e5bd57cb93 (diff) | |
download | mpv-2065e0ba3635afe575977c02c1efbbd62e9891bc.tar.bz2 mpv-2065e0ba3635afe575977c02c1efbbd62e9891bc.tar.xz |
w32: enable heap corruption detection
Enable the terminate-on-corruption feature. This is recommended for new
Windows applications and shouldn't cause a performance hit. It actually
shouldn't change anything for 64-bit builds, since Win64 has this
switched on by default.
See:
http://blogs.msdn.com/b/michael_howard/archive/2008/02/18/faq-about-heapsetinformation-in-windows-vista-and-heap-based-buffer-overruns.aspx
-rw-r--r-- | player/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/player/main.c b/player/main.c index 400fab0426..2c93a67ca6 100644 --- a/player/main.c +++ b/player/main.c @@ -261,6 +261,9 @@ static void osdep_preinit(int *p_argc, char ***p_argv) #if defined(__MINGW32__) || defined(__CYGWIN__) // stop Windows from showing all kinds of annoying error dialogs SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); + + // Enable heap corruption detection + HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); #endif terminal_init(); |