Handle zero-length lines in log viewer

This commit is contained in:
Jon Evans 2022-06-07 19:46:51 -04:00
parent 185016b84b
commit af8deff063
1 changed files with 8 additions and 8 deletions

View File

@ -65,8 +65,8 @@ void PNS_LOG_VIEWER_OVERLAY::AnnotatedPolyline( const SHAPE_LINE_CHAIN& aL, std:
{
Polyline( aL );
if( name.length() > 0 )
m_labelMgr->Add( aL.CPoint(-1), name, GetStrokeColor() );
if( name.length() > 0 && aL.PointCount() > 0 )
m_labelMgr->Add( aL.CPoint( -1 ), name, GetStrokeColor() );
}