Skip to content

Commit

Permalink
More correct error reported when calling SDL_GL_LoadLibrary() without
Browse files Browse the repository at this point in the history
prior call to SDL_Init().
  • Loading branch information
icculus committed Jul 10, 2002
1 parent 08ca5ea commit fcf2a14
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/video/SDL_video.c
Expand Up @@ -1299,10 +1299,14 @@ int SDL_GL_LoadLibrary(const char *path)
int retval;

retval = -1;
if ( video && video->GL_LoadLibrary ) {
retval = video->GL_LoadLibrary(this, path);
if ( video == NULL ) {
SDL_SetError("Video subsystem has not been initialized");
} else {
SDL_SetError("No dynamic GL support in video driver");
if ( video->GL_LoadLibrary ) {
retval = video->GL_LoadLibrary(this, path);
} else {
SDL_SetError("No dynamic GL support in video driver");
}
}
return(retval);
}
Expand Down

0 comments on commit fcf2a14

Please sign in to comment.