mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
Remove unnecessary permissiveness wrt null
This commit is contained in:
parent
edd328c8fe
commit
dad5dd3667
@ -241,7 +241,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
|
||||
void endOperation()
|
||||
{
|
||||
readyClickOperation?.Dispose();
|
||||
Debug.Assert(readyClickOperation != null);
|
||||
readyClickOperation.Dispose();
|
||||
readyClickOperation = null;
|
||||
}
|
||||
}
|
||||
|
@ -40,13 +40,12 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
return new InvokeOnDisposal(endOperation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ends tracking an online operation.
|
||||
/// Does nothing if an operation has not been begun yet.
|
||||
/// </summary>
|
||||
private void endOperation()
|
||||
{
|
||||
leasedInProgress?.Return();
|
||||
if (leasedInProgress == null)
|
||||
throw new InvalidOperationException("Cannot end operation multiple times.");
|
||||
|
||||
leasedInProgress.Return();
|
||||
leasedInProgress = null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user