Only call atexit once
SDL's manual claims that calling SDL_Quit is safe even if init fails, so it's set before SDL_Init:
It is safe to call this function even in the case of errors in initialization. https://wiki.libsdl.org/SDL_Quit
fixes #79 (closed)