Fix SpatialAreaStore not freeing removed areas
authorShadowNinja <shadowninja@minetest.net>
Fri, 30 Oct 2015 14:26:14 +0000 (10:26 -0400)
committerShadowNinja <shadowninja@minetest.net>
Mon, 7 Mar 2016 21:33:20 +0000 (16:33 -0500)
src/util/areastore.cpp

index fdd4d7b79fd39fec2347c3cd3f1fc47a835eebdb..357ce37f07271e0191e1f540b740f0b42562b8b6 100644 (file)
@@ -275,6 +275,7 @@ bool SpatialAreaStore::removeArea(u32 id)
                Area *a = &itr->second;
                bool result = m_tree->deleteData(get_spatial_region(a->minedge,
                        a->maxedge), id);
+               areas_map.erase(itr);
                invalidateCache();
                return result;
        } else {