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

Commit

Permalink
Don't try to create an OpenGL window if we can't load the OpenGL libr…
Browse files Browse the repository at this point in the history
…ary.
  • Loading branch information
slouken committed Oct 28, 2012
1 parent 0fe99b9 commit f543bba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/SDL_video.c
Expand Up @@ -1168,7 +1168,9 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
SDL_SetError("No OpenGL support in video driver");
return NULL;
}
SDL_GL_LoadLibrary(NULL);
if (SDL_GL_LoadLibrary(NULL) < 0) {
return NULL;
}
}
window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
window->magic = &_this->window_magic;
Expand Down

0 comments on commit f543bba

Please sign in to comment.