Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Ensure that the right window is current in SDL_GL_SwapWindow.

  • Loading branch information
jorgenpt committed Aug 7, 2013
1 parent 6a505b3 commit a9506a43aacbf4d8220447bd0cd277f9998a7e9a
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/video/SDL_video.c
@@ -2854,6 +2854,12 @@ SDL_GL_SwapWindow(SDL_Window * window)
SDL_SetError("The specified window isn't an OpenGL window");
return;
}

if (SDL_GL_GetCurrentWindow() != window) {
SDL_SetError("The specified window has not been made current");
return;
}

_this->GL_SwapWindow(_this, window);
}

0 comments on commit a9506a4

Please sign in to comment.