From bc1254271fef1a250c4ff877e4a36dbb1b17658b Mon Sep 17 00:00:00 2001 From: Andreas Lochmann Date: Wed, 10 Aug 2022 12:13:44 +0200 Subject: [PATCH] Fix segfaults during shutdown when deleting shogun stones. See GitHub issues #65 and #78. --- src/world.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/world.cc b/src/world.cc index 5981c677c..98419dae6 100644 --- a/src/world.cc +++ b/src/world.cc @@ -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; @@ -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();