From 915376b37988f93704553aeda103d525420997ea Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 15 Dec 2021 16:20:28 +0200 Subject: SL-16495 FIXED Crash when unchecking "Animated Mesh" setting --- indra/newview/llvovolume.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c312ebb307..e7d4ae49f0 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5656,6 +5656,19 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) facep->mAvatar = avatar; any_rigged_face = true; } + else + { + if (facep->isState(LLFace::RIGGED)) + { + //face is not rigged but used to be, remove from rigged face pool + LLDrawPoolAvatar* pool = (LLDrawPoolAvatar*) facep->getPool(); + if (pool) + { + pool->removeFace(facep); + } + facep->clearState(LLFace::RIGGED); + } + } if (cur_total > max_total || facep->getIndicesCount() <= 0 || facep->getGeomCount() <= 0) { -- cgit v1.2.3