Skip to content

Commit

Permalink
Fixed save/load crash introduced with life-sustained systems change.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjonj committed Jul 6, 2014
1 parent fedab0c commit 4faca4f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/engine/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ struct Engine::Implementation : public Ogre::WindowEventListener {
pair.second->entityManager().clear();
}
}
for (auto& kv : *m_prevShutdownSystems) {
kv.first->deactivate();
}
for (auto& kv : *m_nextShutdownSystems) {
kv.first->deactivate();
}
m_prevShutdownSystems->clear();
m_nextShutdownSystems->clear();
m_currentGameState = nullptr;
// Switch gamestate
std::string gameStateName = savegame.get<std::string>("currentGameState");
Expand Down

0 comments on commit 4faca4f

Please sign in to comment.