Skip to content

Commit

Permalink
Fixed crash in GGI detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Lantinga committed May 10, 2001
1 parent d4c8b29 commit b460a94
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/video/ggi/SDL_ggivideo.c
Expand Up @@ -75,11 +75,13 @@ static void GGI_FreeHWSurface(_THIS, SDL_Surface *surface);
static int GGI_Available(void)
{
ggi_visual_t *vis;

vis = ggiOpen(NULL);
if (vis != NULL)
{
ggiClose(vis);

vis = NULL;
if (ggiInit() == 0) {
vis = ggiOpen(NULL);
if (vis != NULL) {
ggiClose(vis);
}
}
return (vis != NULL);
}
Expand Down

0 comments on commit b460a94

Please sign in to comment.