Handle SDL_QUIT event