Fix crashes on completing a taiko map (where a strong his is the last hit in the map).

This commit is contained in:
Dean Herbert
2017-04-07 16:55:41 +09:00
parent f5f65fa230
commit 39175905e4

View File

@ -20,6 +20,7 @@ using osu.Game.Screens.Backgrounds;
using osu.Game.Screens.Ranking; using osu.Game.Screens.Ranking;
using System; using System;
using System.Linq; using System.Linq;
using osu.Framework.Threading;
using osu.Game.Modes.Scoring; using osu.Game.Modes.Scoring;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
@ -237,14 +238,16 @@ namespace osu.Game.Screens.Play
}); });
} }
private ScheduledDelegate onCompletionEvent;
private void onCompletion() private void onCompletion()
{ {
// Only show the completion screen if the player hasn't failed // Only show the completion screen if the player hasn't failed
if (scoreProcessor.HasFailed) if (scoreProcessor.HasFailed || onCompletionEvent != null)
return; return;
Delay(1000); Delay(1000);
Schedule(delegate onCompletionEvent = Schedule(delegate
{ {
ValidForResume = false; ValidForResume = false;
Push(new Results Push(new Results