Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Ensure that the right window is current in SDL_GL_SwapWindow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenpt committed Aug 7, 2013
1 parent 6a505b3 commit a9506a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/SDL_video.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit a9506a4

Please sign in to comment.