aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2019-10-09 19:54:15 +0200
committerSmallJoker <mk939@ymail.com>2019-10-09 20:03:31 +0200
commitcbcb9e0b1cd717cc4a7e48eb8cc5c74678c5427f (patch)
tree7965019dc351be16d5e6fd9cddd9f67bb31d532c /src
parentb49dfa92ce3ef37b1b73698906c64191fb47e226 (diff)
downloadminetest-cbcb9e0b1cd717cc4a7e48eb8cc5c74678c5427f.tar.gz
minetest-cbcb9e0b1cd717cc4a7e48eb8cc5c74678c5427f.tar.bz2
minetest-cbcb9e0b1cd717cc4a7e48eb8cc5c74678c5427f.zip
ContentCAO: Fix segfault on quit (attached)
Diffstat (limited to 'src')
-rw-r--r--src/client/activeobjectmgr.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/activeobjectmgr.cpp b/src/client/activeobjectmgr.cpp
index 05ded3d8c..82f3cb944 100644
--- a/src/client/activeobjectmgr.cpp
+++ b/src/client/activeobjectmgr.cpp
@@ -29,7 +29,10 @@ void ActiveObjectMgr::clear()
// delete active objects
for (auto &active_object : m_active_objects) {
delete active_object.second;
+ // Object must be marked as gone when children try to detach
+ active_object.second = nullptr;
}
+ m_active_objects.clear();
}
void ActiveObjectMgr::step(