Skip to content

Commit

Permalink
Check return value from MOJOSHADER_glInit().
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 27, 2008
1 parent 02d8c9d commit 604bb3e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion finderrors.c
Expand Up @@ -115,7 +115,12 @@ int main(int argc, char **argv)
SDL_GL_LoadLibrary(NULL);
SDL_SetVideoMode(640, 480, 0, SDL_OPENGL);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
MOJOSHADER_glInit(profile, SDL_GL_GetProcAddress, 0, 0, 0);
if (!MOJOSHADER_glInit(profile, SDL_GL_GetProcAddress, 0, 0, 0))
{
printf("MOJOSHADER_glInit() fail: %s\n", MOJOSHADER_glGetError());
SDL_Quit();
return 1;
} // if
#endif

for (i = 2; i < argc; i++)
Expand Down

0 comments on commit 604bb3e

Please sign in to comment.