mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Don't access frame data if nothing there.
This commit is contained in:
parent
792843d34e
commit
e2ec143893
@ -408,7 +408,7 @@ void View::DrawImpl()
|
|||||||
ImGui::Begin( "Profiler", nullptr, ImGuiWindowFlags_ShowBorders );
|
ImGui::Begin( "Profiler", nullptr, ImGuiWindowFlags_ShowBorders );
|
||||||
if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 80, 0 ) ) ) m_pause = !m_pause;
|
if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 80, 0 ) ) ) m_pause = !m_pause;
|
||||||
ImGui::SameLine();
|
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();
|
DrawFrames();
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user