mirror of
https://github.com/joel16/SDL2.git
synced 2024-12-12 13:35:53 +00:00
Fixed crash in GGI detection
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4018
This commit is contained in:
parent
dbbb4480a7
commit
24bdaa544e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user