From 948dd878a4060bac728f0af1cf7c0d0048ddace0 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 19 Jun 2014 14:21:14 -0700 Subject: Don't throw an exception if a debugger is present. --- includes/Exceptions.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'includes/Exceptions.h') diff --git a/includes/Exceptions.h b/includes/Exceptions.h index f68239f..1c66968 100644 --- a/includes/Exceptions.h +++ b/includes/Exceptions.h @@ -99,9 +99,11 @@ static inline void * realloc(void * previous, size_t size) { static inline void AssertHelperInner(const String & msg, const char * details = NULL) throw (GeneralException) { #if defined(_MSC_VER) && defined(_DEBUG) - __debugbreak(); + if (IsDebuggerPresent()) + __debugbreak(); + else #endif - throw GeneralException(msg, details); + throw GeneralException(msg, details); } static inline void AssertHelper(const String & msg, const char * fmt, ...) printfwarning(2, 3); -- cgit v1.2.3