Skip to content
Permalink
Browse files
More correct error reported when calling SDL_GL_LoadLibrary() without
prior call to SDL_Init().
  • Loading branch information
icculus committed Jul 10, 2002
1 parent 08ca5ea commit fcf2a14a785b5db63a43eee59dfdd9a90589ff29
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/video/SDL_video.c
@@ -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);
}

0 comments on commit fcf2a14

Please sign in to comment.