diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 92429f856c..3d48b723b2 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -36,6 +36,7 @@ #include // for KiROUND #include +#include #include #include @@ -1017,7 +1018,7 @@ void CAIRO_GAL_BASE::drawGridCross( const VECTOR2D& aPoint ) void CAIRO_GAL_BASE::drawGridPoint( const VECTOR2D& aPoint, double aSize ) { auto p = roundp( xform( aPoint ) ); - auto s = xform( aSize / 2.0 ); + auto s = std::max( 1.0, xform( aSize / 2.0 ) ); cairo_set_source_rgba( currentContext, gridColor.r, gridColor.g, gridColor.b, gridColor.a ); cairo_move_to( currentContext, p.x, p.y );