Fixed crash in GGI detection

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4018
This commit is contained in:
Sam Lantinga 2001-05-10 18:10:19 +00:00
parent dbbb4480a7
commit 24bdaa544e

View File

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