[Fix] Fullscreen: double free (someone should have told me not to free the ListModes :/

This commit is contained in:
Allanis 2013-05-15 23:02:58 +01:00
parent c4ede9fcce
commit bd6281692b

View File

@ -572,7 +572,6 @@ int gl_init(void) {
flags |= SDL_FULLSCREEN * (gl_has(OPENGL_FULLSCREEN) ? 1: 0);
supported = 0;
modes = NULL;
// Initializes video.
if(SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) {
@ -684,14 +683,6 @@ int gl_init(void) {
glClear(GL_COLOR_BUFFER_BIT);
// Cleanup.
if(modes != NULL) {
// Free the modes.
for(i = 0; modes[i]; ++i)
free(modes[i]);
free(modes);
}
return 0;
}