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.
This commit is contained in:
Azaezel 2015-09-17 16:14:49 -05:00
parent 70c7a67456
commit 27112c468a

View file

@ -214,12 +214,10 @@ Profiler::~Profiler()
void Profiler::reset() void Profiler::reset()
{ {
mEnabled = false; // in case we're in a profiler call. mEnabled = false; // in case we're in a profiler call.
ProfilerData * head = mProfileList; while (mProfileList)
ProfilerData * curr = NULL;
while ((curr = head) != NULL)
{ {
head = head->mNextProfilerData; free(mProfileList);
free(curr); mProfileList = NULL;
} }
for(ProfilerRootData *walk = ProfilerRootData::sRootList; walk; walk = walk->mNextRoot) for(ProfilerRootData *walk = ProfilerRootData::sRootList; walk; walk = walk->mNextRoot)