Skip to content

Commit

Permalink
Fix segfaults during shutdown when deleting shogun stones. See GitHub…
Browse files Browse the repository at this point in the history
… issues #65 and #78.
  • Loading branch information
alochmann committed Aug 10, 2022
1 parent 63e1e2c commit bc12542
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/world.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,7 @@ void World::stone_change(GridPos p) {
/* -------------------- Functions -------------------- */

void Resize(int w, int h) {
// The following is not quite clean; see GitHub Issue #78.
level.reset(new World(w, h));
display::NewWorld(w, h);
server::WorldSized = true;
Expand Down Expand Up @@ -2375,7 +2376,8 @@ void InitWorld() {
}

void ShutdownWorld() {
level.reset();
// The following is not quite clean; see GitHub Issue #78.
level.reset(new World(1,1));
player::PlayerShutdown();
Repos_Shutdown();
WorldProxy::shutdown();
Expand Down

0 comments on commit bc12542

Please sign in to comment.