Browse Source

Get rid of lockAcquired.

pull/4922/head
Dariusz Komosinski 6 years ago
parent
commit
bf400cd353
  1. 6
      src/Windows/Avalonia.Win32/FramebufferManager.cs

6
src/Windows/Avalonia.Win32/FramebufferManager.cs

@ -28,9 +28,7 @@ namespace Avalonia.Win32
public ILockedFramebuffer Lock()
{
var lockAcquired = false;
Monitor.Enter(_lock, ref lockAcquired);
Monitor.Enter(_lock);
LockedFramebuffer? fb = null;
@ -58,7 +56,7 @@ namespace Avalonia.Win32
{
// We free the lock when for whatever reason framebuffer was not created.
// This allows for a potential retry later.
if (fb is null && lockAcquired)
if (fb is null)
{
Monitor.Exit(_lock);
}

Loading…
Cancel
Save