mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 01:22:59 +08:00
Mark access to exception if task faulted as safe
There are seemingly no C#-side compile-time guarantees that it is safe, but if the task's state is `Faulted` (as is checked right before), the exception cannot be null as per the documentation.
This commit is contained in:
parent
f2d0f7db99
commit
43c73f9583
@ -6,6 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using osu.Framework.Extensions.ObjectExtensions;
|
||||||
|
|
||||||
namespace osu.Game.Extensions
|
namespace osu.Game.Extensions
|
||||||
{
|
{
|
||||||
@ -50,7 +51,7 @@ namespace osu.Game.Extensions
|
|||||||
}
|
}
|
||||||
else if (continuationTask.IsFaulted)
|
else if (continuationTask.IsFaulted)
|
||||||
{
|
{
|
||||||
tcs.TrySetException(continuationTask.Exception);
|
tcs.TrySetException(continuationTask.Exception.AsNonNull());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user