Skip to content

Commit

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

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

Expand Down

0 comments on commit 52a3feb

Please sign in to comment.