mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 06:52:55 +08:00
Fix up possible nullref due to early access of Parent
This commit is contained in:
parent
15c9e4a446
commit
6a690908cf
@ -31,6 +31,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Parent == null)
|
||||
return Vector2.Zero;
|
||||
|
||||
var parentSize = Parent.DrawSize;
|
||||
var aspectSize = parentSize.X * 0.75f < parentSize.Y ? new Vector2(parentSize.X, parentSize.X * 0.75f) : new Vector2(parentSize.Y * 4f / 3f, parentSize.Y);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user