Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fixed crash in GGI detection
- Loading branch information
Showing
with
7 additions
and
5 deletions.
-
+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); |
|
|
} |
|
|