]> git.lizzy.rs Git - minetest.git/blobdiff - src/client/activeobjectmgr.cpp
fix: drop old irrlicht <1.8 compat on Client::loadMedia
[minetest.git] / 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(