mirror of
https://github.com/ppy/osu
synced 2025-02-24 22:57:05 +00:00
Fix potential null reference with flash sample when exiting rapidly
Fixes `TestForceExitWithOperationInProgress()`.
This commit is contained in:
parent
cd9bf0c753
commit
ea714c86d4
@ -32,7 +32,7 @@ namespace osu.Game.Overlays.Dialog
|
||||
private readonly Vector2 ringMinifiedSize = new Vector2(20f);
|
||||
|
||||
private readonly Box flashLayer;
|
||||
private Sample flashSample = null!;
|
||||
private Sample? flashSample;
|
||||
|
||||
private readonly Container content;
|
||||
private readonly Container ring;
|
||||
@ -267,7 +267,7 @@ namespace osu.Game.Overlays.Dialog
|
||||
flashLayer.FadeInFromZero(80, Easing.OutQuint)
|
||||
.Then()
|
||||
.FadeOutFromOne(1500, Easing.OutQuint);
|
||||
flashSample.Play();
|
||||
flashSample?.Play();
|
||||
}
|
||||
|
||||
protected override bool OnKeyDown(KeyDownEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user