diff --git a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp index 695821f4bc..edcf0085ac 100644 --- a/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp +++ b/Source/Core/Renderer/ERS_CLASS_VisualRenderer/ERS_CLASS_VisualRenderer.cpp @@ -1041,12 +1041,15 @@ void ERS_CLASS_VisualRenderer::DrawViewportOverlay(int Index, ERS_CLASS_SceneMan // Show Loading Time Info if (Viewports[Index]->ShowLoadingInfo_) { + + unsigned long NumModels = SceneManager->Scenes_[SceneManager->ActiveScene_]->Models.size(); + double LongestLoadingTime = 0; double ShortestLoadingTime = 65535; std::vector LoadingTimeList; for (unsigned long i = 0; i < NumModels; i++) { - + if (SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TotalLoadingTime_ > LongestLoadingTime) { LongestLoadingTime = SceneManager->Scenes_[SceneManager->ActiveScene_]->Models[i]->TotalLoadingTime_; }