diff --git a/base/logging.h b/base/logging.h index 0c96a12d05..72837a4c6f 100644 --- a/base/logging.h +++ b/base/logging.h @@ -19,7 +19,7 @@ #ifdef _WIN32 #ifdef _M_X64 -inline void Crash() { /*DebugBreak();*/ } +inline void Crash() { int *x = (int *)1337; *x = 1; } #else inline void Crash() { __asm { int 3 }; } #endif diff --git a/profiler/profiler.cpp b/profiler/profiler.cpp index 259a4805e5..b3aff97281 100644 --- a/profiler/profiler.cpp +++ b/profiler/profiler.cpp @@ -125,6 +125,9 @@ void internal_profiler_leave(int category) { history[profiler.historyPos].count[category]++; profiler.depth--; + if (profiler.depth < 0) { + FLOG("Profiler enter/leave mismatch!"); + } int parent = profiler.parentCategory[profiler.depth]; if (parent != -1) { // Resume tracking the parent.