From 27112c468aaa1b1938facf6da679e097595ebbac Mon Sep 17 00:00:00 2001 From: Azaezel Date: Thu, 17 Sep 2015 16:14:49 -0500 Subject: [PATCH] reversion for https://github.com/GarageGames/Torque3D/commit/a4c09d168029dccac872b5816b21f8298f73f5e9 To be honest, can't remember how I was intending to fix that, but this one's causing it to fail to profile twice in a row, so kill it with fire. --- Engine/source/platform/profiler.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Engine/source/platform/profiler.cpp b/Engine/source/platform/profiler.cpp index ca34b4593..fb60453fc 100644 --- a/Engine/source/platform/profiler.cpp +++ b/Engine/source/platform/profiler.cpp @@ -214,12 +214,10 @@ Profiler::~Profiler() void Profiler::reset() { mEnabled = false; // in case we're in a profiler call. - ProfilerData * head = mProfileList; - ProfilerData * curr = NULL; - while ((curr = head) != NULL) + while (mProfileList) { - head = head->mNextProfilerData; - free(curr); + free(mProfileList); + mProfileList = NULL; } for(ProfilerRootData *walk = ProfilerRootData::sRootList; walk; walk = walk->mNextRoot)