Skip to content

Commit

Permalink
correct OverrideCancelCoTaskDecorator<TResult>.Result
Browse files Browse the repository at this point in the history
  • Loading branch information
tibel committed Dec 12, 2014
1 parent 056f3de commit 284f3ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ internal sealed class OverrideCancelCoTaskDecorator<TResult> : CoTaskDecorator,
protected override void OnInnerResultCompleted(CoroutineExecutionContext context, ICoTask innerCoTask,
CoTaskCompletedEventArgs args)
{
if (args.Error != null)
if (args.Error == null)
Result = args.WasCancelled ? _cancelResult : ((ICoTask<TResult>)innerCoTask).Result;

OnCompleted(new CoTaskCompletedEventArgs(args.Error, false));
Expand Down

0 comments on commit 284f3ac

Please sign in to comment.