From: SmallJoker Date: Wed, 9 Oct 2019 17:54:15 +0000 (+0200) Subject: ContentCAO: Fix segfault on quit (attached) X-Git-Tag: 5.1.0~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cbcb9e0b1cd717cc4a7e48eb8cc5c74678c5427f;p=oweals%2Fminetest.git ContentCAO: Fix segfault on quit (attached) --- 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(