diff --git a/map_gen/maps/diggy/debug.lua b/map_gen/maps/diggy/debug.lua index 0c693cba9..404642be7 100644 --- a/map_gen/maps/diggy/debug.lua +++ b/map_gen/maps/diggy/debug.lua @@ -79,6 +79,10 @@ function Debug.print_grid_value(value, surface, position, scale, offset, immutab end end + if not(surface and surface.valid) then + return + end + if not immutable then local text_entity = surface.find_entity('flying-text', position)