More correct error reported when calling SDL_GL_LoadLibrary() without

prior call to SDL_Init().

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40424
This commit is contained in:
Ryan C. Gordon 2002-07-10 05:18:09 +00:00
parent 69c56b9025
commit 7aab656e69

View file

@ -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);
}