Add safety in RectangularPositionSnapGrid that size is greater than zero

Would crash otherwise
This commit is contained in:
Dean Herbert 2023-07-28 16:25:40 +09:00
parent 57e51f4d5b
commit 0e4db9b439

View File

@ -54,8 +54,12 @@ namespace osu.Game.Screens.Edit.Compose.Components
if (!gridCache.IsValid)
{
ClearInternal();
createContent();
gridCache.Validate();
if (DrawSize != Vector2.Zero)
{
createContent();
gridCache.Validate();
}
}
}