ContentCAO: Fix segfault on quit (attached)
authorSmallJoker <mk939@ymail.com>
Wed, 9 Oct 2019 17:54:15 +0000 (19:54 +0200)
committerSmallJoker <mk939@ymail.com>
Wed, 9 Oct 2019 18:03:31 +0000 (20:03 +0200)
src/client/activeobjectmgr.cpp

index 05ded3d8ce48fa8a5f01573979c430a52c5e6f50..82f3cb9447921cbf3e4596cdb51ce94f7b24321d 100644 (file)
@@ -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(