diff --git a/libs/kimath/src/geometry/shape_collisions.cpp b/libs/kimath/src/geometry/shape_collisions.cpp index 103f187a4f..fee454c0c0 100644 --- a/libs/kimath/src/geometry/shape_collisions.cpp +++ b/libs/kimath/src/geometry/shape_collisions.cpp @@ -620,7 +620,9 @@ bool SHAPE_RECT::Collide( const SEG& aSeg, int aClearance, int* aActual ) const { if( BBox( 0 ).Contains( aSeg.A ) || BBox( 0 ).Contains( aSeg.B ) ) { - *aActual = 0; + if( aActual ) + *aActual = 0; + return true; }