From 260eb1809373261805aeb095948cbb446adf7da8 Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Tue, 10 Jul 2018 12:03:15 -0300 Subject: [PATCH] bugfix --- examples/testbed/framework/test.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/testbed/framework/test.cpp b/examples/testbed/framework/test.cpp index befad6c..39170c1 100644 --- a/examples/testbed/framework/test.cpp +++ b/examples/testbed/framework/test.cpp @@ -25,14 +25,20 @@ extern u32 b3_convexCalls, b3_convexCacheHits; extern u32 b3_gjkCalls, b3_gjkIters, b3_gjkMaxIters; extern bool b3_convexCache; +static bool push_ok = false; + void b3BeginProfileScope(const char* name) { - g_profiler->PushEvent(name); + push_ok = g_profiler->PushEvent(name); } void b3EndProfileScope() { - g_profiler->PopEvent(); + if (push_ok) + { + g_profiler->PopEvent(); + push_ok = false; + } } Test::Test() :