Ensure that the right window is current in SDL_GL_SwapWindow.
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Wed, 07 Aug 2013 16:29:28 -0700
changeset 759645e5c263c096
parent 7595 ede2237fcebf
child 7597 b7219f6cf67a
Ensure that the right window is current in SDL_GL_SwapWindow.
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Wed Aug 07 16:29:25 2013 -0700
     1.2 +++ b/src/video/SDL_video.c	Wed Aug 07 16:29:28 2013 -0700
     1.3 @@ -2854,6 +2854,12 @@
     1.4          SDL_SetError("The specified window isn't an OpenGL window");
     1.5          return;
     1.6      }
     1.7 +
     1.8 +    if (SDL_GL_GetCurrentWindow() != window) {
     1.9 +        SDL_SetError("The specified window has not been made current");
    1.10 +        return;
    1.11 +    }
    1.12 +
    1.13      _this->GL_SwapWindow(_this, window);
    1.14  }
    1.15