diff options
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_runtime.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_runtime.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c index 60699589a77..51dd9a9ea3a 100644 --- a/source/blender/blenkernel/intern/mesh_runtime.c +++ b/source/blender/blenkernel/intern/mesh_runtime.c @@ -43,6 +43,7 @@ #include "BKE_bvhutils.h" #include "BKE_mesh.h" #include "BKE_mesh_runtime.h" +#include "BKE_subdiv_ccg.h" /* -------------------------------------------------------------------- */ /** \name Mesh Runtime Struct Utils @@ -196,6 +197,11 @@ void BKE_mesh_runtime_clear_geometry(Mesh *mesh) { bvhcache_free(&mesh->runtime.bvh_cache); MEM_SAFE_FREE(mesh->runtime.looptris.array); + /* TODO(sergey): Does this really belong here? */ + if (mesh->runtime.subsurf_ccg != NULL) { + BKE_subdiv_ccg_destroy(mesh->runtime.subsurf_ccg); + mesh->runtime.subsurf_ccg = NULL; + } } /** \} */ |