diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-06-19 14:21:14 -0700 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2014-06-19 14:21:14 -0700 |
commit | 948dd878a4060bac728f0af1cf7c0d0048ddace0 (patch) | |
tree | ee7706d2eb1e636d8c32ac1dca38701ce0545a23 /includes | |
parent | 6850a909557b488c624a50324d1b806d8d013380 (diff) |
Don't throw an exception if a debugger is present.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Exceptions.h | 6 |
1 files changed, 4 insertions, 2 deletions
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); |