Commit 7aab656e authored by Ryan C. Gordon's avatar Ryan C. Gordon

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
parent 69c56b90
...@@ -1299,10 +1299,14 @@ int SDL_GL_LoadLibrary(const char *path) ...@@ -1299,10 +1299,14 @@ int SDL_GL_LoadLibrary(const char *path)
int retval; int retval;
retval = -1; retval = -1;
if ( video && video->GL_LoadLibrary ) { if ( video == NULL ) {
retval = video->GL_LoadLibrary(this, path); SDL_SetError("Video subsystem has not been initialized");
} else { } 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); return(retval);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment