Skip to content

Commit

Permalink
Remove double check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaanstra authored and Sergio0694 committed Jan 20, 2024
1 parent 97e1aa5 commit 7c9fe67
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/WinRT.Runtime/ObjectReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,9 @@ public IntPtr GetRef()

protected void ThrowIfDisposed()
{
if (disposed)
lock (_disposedLock)
{
lock (_disposedLock)
{
if (disposed) throw new ObjectDisposedException("ObjectReference");
}
if (disposed) throw new ObjectDisposedException("ObjectReference");
}
}

Expand Down

0 comments on commit 7c9fe67

Please sign in to comment.