mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Ignore statistics update subscriptions with invalid score ID
If score submission fails, the score will not receive a correct online ID from web, but will still be passed on to the solo statistics watcher on the results screen. This could lead to the watcher subscribing to changes with score ID equal to the default of -1. If this happened more than once, that would cause a crash due to duplicate keys in the `callbacks` dictionary. Closes #21837.
This commit is contained in:
@ -51,7 +51,7 @@ namespace osu.Game.Online.Solo
|
||||
if (!api.IsLoggedIn)
|
||||
return;
|
||||
|
||||
if (!score.Ruleset.IsLegacyRuleset())
|
||||
if (!score.Ruleset.IsLegacyRuleset() || score.OnlineID <= 0)
|
||||
return;
|
||||
|
||||
var callback = new StatisticsUpdateCallback(score, onUpdateReady);
|
||||
|
Reference in New Issue
Block a user