Ideally you'd listen for the sf::Event::MouseLeft event and save your app/close it, then continue next load. There are a few issues right now with lost contexts, trying to draw while the context is lost, etc. unfortunately completely lacking time right now to set something up for debugging etc.