Skip to content
Permalink
Browse files

Fixed crash in GGI detection

  • Loading branch information
Sam Lantinga committed May 10, 2001
1 parent d4c8b29 commit b460a94b61d7c3b638a1643701fcec50c22275b6
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/video/ggi/SDL_ggivideo.c
@@ -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);
}

0 comments on commit b460a94

Please sign in to comment.