diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 435f01696..1673d0e0a 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -3271,7 +3271,7 @@ SDL_GL_SwapWindow(SDL_Window * window) void SDL_GL_DeleteContext(SDL_GLContext context) { - if (!_this || !context) { + if (!_this || !_this->gl_data || !context) { return; } _this->GL_MakeCurrent(_this, NULL, NULL);