I have been working on a basic starter setup for an SFML game. When I run it, it works fine, states transition as expected, updates are are at 30 per second, FPS is unbound. Going well.
However, when I transition from the game state to the pause state and back, I get a segfault when closing the window. This does not happen when exiting directly from the game (initial) state, or from the pause state. It only happens when exiting after returning from the pause state to the game state.
I have no idea what I'm missing. Take a look at the code and let me know if you have any ideas.
https://github.com/kiswa/SFML_Starter/