From cbcb9e0b1cd717cc4a7e48eb8cc5c74678c5427f Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 9 Oct 2019 19:54:15 +0200 Subject: ContentCAO: Fix segfault on quit (attached) --- src/client/activeobjectmgr.cpp | 3 +++ 1 file changed, 3 insertions(+) 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( -- cgit v1.2.3