mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 19:35:29 +00:00
MakeCurrent(null) should make context non-current
This fixes the crash in the "GameWindow Threading" example.
This commit is contained in:
parent
2c867de1f4
commit
7460452b26
|
@ -178,7 +178,7 @@ namespace OpenTK.Platform.SDL2
|
|||
public override void MakeCurrent(IWindowInfo window)
|
||||
{
|
||||
var sdl_window = window as Sdl2WindowInfo;
|
||||
if (SDL.SDL_GL_MakeCurrent(sdl_window.Handle, SdlContext.Handle) < 0)
|
||||
if (SDL.SDL_GL_MakeCurrent(sdl_window != null ? sdl_window.Handle : IntPtr.Zero, SdlContext.Handle) < 0)
|
||||
{
|
||||
Debug.Print("SDL2 MakeCurrent failed with: {0}", SDL.SDL_GetError());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue