X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fclient%2Factiveobjectmgr.cpp;h=82f3cb9447921cbf3e4596cdb51ce94f7b24321d;hb=bc1888ff21d50eb21c8f4d381e5dcc8049f7e36c;hp=05ded3d8ce48fa8a5f01573979c430a52c5e6f50;hpb=539f016c1b1a706da2c113435ec60bb39c868f4b;p=minetest.git 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(