mirror of
https://github.com/ppy/osu
synced 2025-01-22 13:53:30 +00:00
Fix non-hosts crashing on load requested
`onLoadRequested()` always released the `readyClickOperation` ongoing operation, without checking whether it actually needs to/should (it should only do so if the action initiating the operation was starting the game by the host). This would crash all other consumers, who already released the operation when their ready-up operation completed server side. To resolve, relax the constraint such that the operation can be ended multiple times in any order. At the end of the day the thing that matters is that the operation is done and the ready button is unblocked.
This commit is contained in:
parent
becd52b5d2
commit
2d3cacca11
@ -241,8 +241,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
|
||||
void endOperation()
|
||||
{
|
||||
Debug.Assert(readyClickOperation != null);
|
||||
readyClickOperation.Dispose();
|
||||
readyClickOperation?.Dispose();
|
||||
readyClickOperation = null;
|
||||
}
|
||||
}
|
||||
@ -255,9 +254,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
|
||||
StartPlay(() => new MultiplayerPlayer(SelectedItem.Value, userIds));
|
||||
|
||||
Debug.Assert(readyClickOperation != null);
|
||||
|
||||
readyClickOperation.Dispose();
|
||||
readyClickOperation?.Dispose();
|
||||
readyClickOperation = null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user