Protect against plot range equal zero.

This commit is contained in:
Bartosz Taudul 2019-06-03 01:19:01 +02:00
parent 76ed1e666f
commit 42fefde161

View File

@ -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; max = tmp[i].val > max ? tmp[i].val : max;
} }
} }
if( min == max )
{
min--;
max++;
}
auto pvit = m_plotView.find( v ); auto pvit = m_plotView.find( v );
if( pvit == m_plotView.end() ) if( pvit == m_plotView.end() )