[Fix] Fullscreen: double free (someone should have told me not to free the ListModes :/
This commit is contained in:
parent
c4ede9fcce
commit
bd6281692b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user