Avoid infinite loop if the grid size is zero or less

This commit is contained in:
Seth Hillbrand 2025-08-05 16:18:02 -07:00
parent 29eee9f126
commit ece58909ba

View File

@ -823,6 +823,8 @@ public:
inline VECTOR2D GetVisibleGridSize() const
{
VECTOR2D gridScreenSize( m_gridSize );
gridScreenSize.x = std::max( 100.0, gridScreenSize.x );
gridScreenSize.y = std::max( 100.0, gridScreenSize.y );
double gridThreshold = computeMinGridSpacing() / m_worldScale;