From c71c1d4d1af6e810899e14e64860ffacfb5021b0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 1 Jun 2019 00:15:09 +0100 Subject: [PATCH] Prevent infinite loop when grid size not defined. --- common/gal/opengl/opengl_gal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 0118b9125c..c96200cac5 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1253,7 +1253,7 @@ void OPENGL_GAL::DrawGrid() // force flush nonCachedManager->EndDrawing(); - if( !gridVisibility ) + if( !gridVisibility || gridSize.x == 0 || gridSize.y == 0 ) return; VECTOR2D gridScreenSize( gridSize );