calling SDL_Quit() stopped the segfault
This commit is contained in:
parent
34223e9403
commit
3e09fbb66f
@ -16,13 +16,15 @@ int main(char[][] args)
|
|||||||
|
|
||||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||||
|
|
||||||
SDL_Surface *screen;
|
SDL_Surface *screen = SDL_SetVideoMode(WIDTH, HEIGHT, 32, SDL_OPENGL);
|
||||||
if ((screen = SDL_SetVideoMode(WIDTH, HEIGHT, 32, SDL_OPENGL)) == null)
|
if (screen == null)
|
||||||
{
|
{
|
||||||
printf("Failed to set video mode!\n");
|
printf("Failed to set video mode!\n");
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDL_Quit();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user