From ca247e9a8003c11e8a0c49a68a24944539ec5e02 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 18 Jul 2023 22:04:32 +0300
Subject: [PATCH] SL-5161 SL-20025 Unref volume

---
 indra/newview/llmeshrepository.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 2118ee74d30..9ccb42cdc56 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -4103,6 +4103,7 @@ void LLMeshRepository::notifyMeshUnavailable(const LLVolumeParams& mesh_params,
         if (sys_volume)
         {
             sys_volume->setMeshAssetUnavaliable(true);
+            LLPrimitive::getVolumeManager()->unrefVolume(sys_volume);
         }
 
 		for (LLVOVolume* vobj : obj_iter->second)
-- 
GitLab