1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +08:00

Merge pull request #10776 from smoogipoo/fix-possible-nullref

Fix possible nullref with non-attached hitobjects
This commit is contained in:
Dean Herbert 2020-11-11 11:14:57 +09:00 committed by GitHub
commit a82291f31f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public void UpdateProgress(double completionProgress)
{
if (drawableSlider == null)
if (drawableSlider?.HitObject == null)
return;
Slider slider = drawableSlider.HitObject;
@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
public void Refresh()
{
if (drawableSlider == null)
if (drawableSlider?.HitObject == null)
return;
// Generate the entire curve