Browse Source

Do not crash on IsCurrent checks (#14089)

pull/14140/head
Max Katz 3 years ago
committed by GitHub
parent
commit
72887ce294
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.OpenGL/Egl/EglContext.cs

2
src/Avalonia.OpenGL/Egl/EglContext.cs

@ -154,7 +154,7 @@ namespace Avalonia.OpenGL.Egl
ShareWith = _sharedWith ?? this
});
public bool IsCurrent => _egl.GetCurrentDisplay() == _disp.Handle && _egl.GetCurrentContext() == Context;
public bool IsCurrent => _context != default && _egl.GetCurrentDisplay() == _disp.Handle && _egl.GetCurrentContext() == _context;
public void Dispose()
{

Loading…
Cancel
Save