瀏覽代碼

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.
Azaezel 10 年之前
父節點
當前提交
27112c468a
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3 5
      Engine/source/platform/profiler.cpp

+ 3 - 5
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)