avoid NullPointer in SDL_GL_MakeCurrent
diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
index 6537b45..2b09524 100644
--- a/src/video/SDL_video.c
+++ b/src/video/SDL_video.c
@@ -3924,6 +3924,10 @@ SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx)
{
int retval;
+ if (!_this) {
+ return SDL_UninitializedVideo();
+ }
+
if (window == SDL_GL_GetCurrentWindow() &&
ctx == SDL_GL_GetCurrentContext()) {
/* We're already current. */