From e2ec14389370c4c8a6d326e9c9348ca2df3e3460 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 20 Sep 2017 18:42:44 +0200 Subject: [PATCH] Don't access frame data if nothing there. --- server/TracyView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 1d2b0e70..6ad638f2 100755 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -408,7 +408,7 @@ void View::DrawImpl() ImGui::Begin( "Profiler", nullptr, ImGuiWindowFlags_ShowBorders ); if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 80, 0 ) ) ) m_pause = !m_pause; ImGui::SameLine(); - ImGui::Text( "Frames: %-7i Time span: %s", m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ) ); + ImGui::Text( "Frames: %-7i Time span: %s", m_frames.size(), m_frames.empty() ? "---" : TimeToString( GetLastTime() - m_frames[0] ) ); DrawFrames(); ImGui::End();