Fix weird test critical failure if exception happens too early in execution

Noticed in passing.

```
Exit code is 134 (Unhandled exception. System.NullReferenceException:
Object reference not set to an instance of an object.
   at osu.Game.OsuGameBase.onExceptionThrown(Exception ex) in
/Users/dean/Projects/osu/osu.Game/OsuGameBase.cs:line 695
   at osu.Framework.Platform.GameHost.abortExecutionFromException(Object
sender, Exception exception, Boolean isTerminating)
   at osu.Framework.Platform.GameHost.unobservedExceptionHandler(Object
sender, UnobservedTaskExceptionEventArgs args)
   at System.Threading.Tasks.TaskExceptionHolder.Finalize())
```
This commit is contained in:
Dean Herbert 2024-08-30 18:14:10 +09:00
parent 07611bd8f5
commit dd7133657d
No known key found for this signature in database

View File

@ -692,7 +692,7 @@ namespace osu.Game
if (Interlocked.Decrement(ref allowableExceptions) < 0)
{
Logger.Log("Too many unhandled exceptions, crashing out.");
RulesetStore.TryDisableCustomRulesetsCausing(ex);
RulesetStore?.TryDisableCustomRulesetsCausing(ex);
return false;
}