diff --git a/code/Terrain/TerrainComponent.cpp b/code/Terrain/TerrainComponent.cpp index 7f27a8c4c8..8289cf5d08 100644 --- a/code/Terrain/TerrainComponent.cpp +++ b/code/Terrain/TerrainComponent.cpp @@ -608,8 +608,11 @@ bool TerrainComponent::createPatches() { m_patches.clear(); m_patchCount = 0; + safeDestroy(m_indexBuffer); safeDestroy(m_vertexBuffer); + safeDestroy(m_drawBuffer); + safeDestroy(m_dataBuffer); const uint32_t heightfieldSize = m_heightfield->getSize(); T_ASSERT(heightfieldSize > 0);