Wie lautet denn der Stacktrace bei der Exception? Also passiert dies innerhalb des
create-Aufrufs oder erst bei der Zuweisung?
Du könntest auch mal versuchen direkt den Konstruktor zu verwenden anstatt die
create()-Funktion:
C+*
1: 2: 3: 4: 5:
| Game::Game(int width, int height, std::string title) : _data->window(sf::VideoMode(width, height), title, sf::Style::Default) { // ... } |
(bin mir aber gerade unsicher, ob dies syntaktisch so zulässig ist...)
Funktioniert der Code denn, wenn du direkt
sf::RenderWindow window als Member der Klasse
Game deklarierst (also ohne den
shared_ptr)?