From 42fefde161a9fab0b7d12cbc39405500f04df30f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 3 Jun 2019 01:19:01 +0200 Subject: [PATCH] Protect against plot range equal zero. --- server/TracyView.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 1cc03982..7fba52d4 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3878,6 +3878,11 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover, fl max = tmp[i].val > max ? tmp[i].val : max; } } + if( min == max ) + { + min--; + max++; + } auto pvit = m_plotView.find( v ); if( pvit == m_plotView.end() )