diff --git a/modules/terraman/world/terrain_chunk.cpp b/modules/terraman/world/terrain_chunk.cpp index 2403dd2c1..f46db8bf4 100644 --- a/modules/terraman/world/terrain_chunk.cpp +++ b/modules/terraman/world/terrain_chunk.cpp @@ -746,6 +746,10 @@ void TerrainChunk::light_remove_index(const int index) { Ref light = _lights[index]; + _lights.remove(index); + light->set_has_owner_chunk(false); + light->disconnect("light_moved", this, "_on_light_moved"); + TerrainWorld *world = get_voxel_world(); if (ObjectDB::instance_validate(world)) {