Prevent infinite loop when grid size not defined.

This commit is contained in:
Jeff Young 2019-06-01 00:15:09 +01:00
parent ed9153a786
commit c71c1d4d1a
1 changed files with 1 additions and 1 deletions

View File

@ -1253,7 +1253,7 @@ void OPENGL_GAL::DrawGrid()
// force flush // force flush
nonCachedManager->EndDrawing(); nonCachedManager->EndDrawing();
if( !gridVisibility ) if( !gridVisibility || gridSize.x == 0 || gridSize.y == 0 )
return; return;
VECTOR2D gridScreenSize( gridSize ); VECTOR2D gridScreenSize( gridSize );