diff --git a/libs/kimath/include/geometry/shape_segment.h b/libs/kimath/include/geometry/shape_segment.h index 5a5f833ee4..ac3ddabdf3 100644 --- a/libs/kimath/include/geometry/shape_segment.h +++ b/libs/kimath/include/geometry/shape_segment.h @@ -78,6 +78,9 @@ public: bool Collide( const SEG& aSeg, int aClearance = 0, int* aActual = nullptr, VECTOR2I* aLocation = nullptr ) const override { + if( aSeg.A == aSeg.B ) + return Collide( aSeg.A, aClearance, aActual, aLocation ); + int min_dist = ( m_width + 1 ) / 2 + aClearance; ecoord dist_sq = m_seg.SquaredDistance( aSeg );