mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 21:32:57 +08:00
Add safety in RectangularPositionSnapGrid
that size is greater than zero
Would crash otherwise
This commit is contained in:
parent
57e51f4d5b
commit
0e4db9b439
@ -54,10 +54,14 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
if (!gridCache.IsValid)
|
if (!gridCache.IsValid)
|
||||||
{
|
{
|
||||||
ClearInternal();
|
ClearInternal();
|
||||||
|
|
||||||
|
if (DrawSize != Vector2.Zero)
|
||||||
|
{
|
||||||
createContent();
|
createContent();
|
||||||
gridCache.Validate();
|
gridCache.Validate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void createContent()
|
private void createContent()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user