Skip to content

Commit

Permalink
Merge pull request #870 from bluetarpmedia/Fix544
Browse files Browse the repository at this point in the history
Remove dead, buggy code
  • Loading branch information
AArnott committed Jul 9, 2021
2 parents 5b9cef9 + 42fbc0f commit b0f7170
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Microsoft.VisualStudio.Threading/JoinableTaskFactory.cs
Expand Up @@ -1227,9 +1227,8 @@ internal bool TryExecute()
if (invokeDelegate is object)
{
this.OnExecuting();
#pragma warning disable CS8602 // Dereference of a possibly null reference.
SynchronizationContext? syncContext = this.job is object ? this.job.ApplicableJobSyncContext : this.job.Factory.ApplicableJobSyncContext;
#pragma warning restore CS8602 // Dereference of a possibly null reference.
RoslynDebug.Assert(this.job is object);
SynchronizationContext? syncContext = this.job.ApplicableJobSyncContext;
using (syncContext.Apply(checkForChangesOnRevert: false))
{
if (invokeDelegate is Action action)
Expand Down

0 comments on commit b0f7170

Please sign in to comment.