(sdl_gl) Fix segfault

This commit is contained in:
Higor Eurípedes 2014-08-22 19:11:26 -03:00
parent 35247bf663
commit 15297c85cd

View File

@ -89,10 +89,13 @@ static void sdl_ctx_destroy(void *data)
if (g_win)
SDL_DestroyWindow(g_win);
g_ctx = NULL;
#else
SDL_FreeSurface(g_win);
g_win = NULL;
if (g_win)
SDL_FreeSurface(g_win);
#endif
g_win = NULL;
SDL_QuitSubSystem(SDL_INIT_VIDEO);
}