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.
@@ -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)