diff --git a/Source/Engine/Profiler/ProfilerCPU.cpp b/Source/Engine/Profiler/ProfilerCPU.cpp index 0e1a06c79..acc662917 100644 --- a/Source/Engine/Profiler/ProfilerCPU.cpp +++ b/Source/Engine/Profiler/ProfilerCPU.cpp @@ -126,7 +126,7 @@ void ProfilerCPU::Thread::EndEvent() { const double time = Platform::GetTimeSeconds() * 1000.0; _depth--; - Event& e = Buffer.Get(Buffer.GetCount() - 1); + Event& e = (Buffer.Last()--).Event(); e.End = time; }