summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2026-08-03 23:57:51 +0300
committerAndrey Lihatskiy <118752495+marchcat@users.noreply.github.com>2026-08-04 14:10:51 +0300
commitf6fa702706aeba8c5a3760a98883943cba3c973b (patch)
tree273cd72a26452926d4571ec101ed69afd4764406
parent4ea85844309a39e8f57382863d2d3b756b4944bb (diff)
#6082 Fix model preview shutdown ordering
-rw-r--r--indra/llphysicsextensionsos/llconvexdecomposition.cpp8
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llmeshrepository.cpp6
-rw-r--r--indra/newview/llmeshrepository.h2
4 files changed, 14 insertions, 5 deletions
diff --git a/indra/llphysicsextensionsos/llconvexdecomposition.cpp b/indra/llphysicsextensionsos/llconvexdecomposition.cpp
index 7b9d775c53..f1973e4815 100644
--- a/indra/llphysicsextensionsos/llconvexdecomposition.cpp
+++ b/indra/llphysicsextensionsos/llconvexdecomposition.cpp
@@ -77,7 +77,11 @@ LLCDResult LLConvexDecomposition::quitThread()
// static
LLCDResult LLConvexDecomposition::quitSystem()
{
+ if (!s_isInitialized)
+ {
+ return LLCD_OK;
+ }
+
+ s_isInitialized = false;
return LLConvexDecompositionVHACD::quitSystem();
}
-
-
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8d08d29d06..2519fbffbb 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1837,6 +1837,9 @@ bool LLAppViewer::cleanup()
if( gViewerWindow)
gViewerWindow->shutdownViews();
+ // Model previews release their decomposition handles while the UI is destroyed.
+ gMeshRepo.shutdownDecomposition();
+
LL_INFOS() << "Cleaning up Inventory" << LL_ENDL;
// Cleanup Inventory after the UI since it will delete any remaining observers
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 933a6d530f..2b8ecbb667 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -4277,15 +4277,17 @@ void LLMeshRepository::shutdown()
delete mMeshMutex;
mMeshMutex = NULL;
- LL_INFOS(LOG_MESH) << "Shutting down decomposition system." << LL_ENDL;
-
if (mDecompThread)
{
mDecompThread->shutdown();
delete mDecompThread;
mDecompThread = NULL;
}
+}
+void LLMeshRepository::shutdownDecomposition()
+{
+ LL_INFOS(LOG_MESH) << "Shutting down decomposition system." << LL_ENDL;
LLConvexDecomposition::quitSystem();
}
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 061b4b5428..28b7a2d01f 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -864,6 +864,7 @@ public:
void init();
void unregisterAllMeshes();
void shutdown();
+ void shutdownDecomposition();
S32 update();
void unregisterMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_params, S32 detail);
@@ -976,4 +977,3 @@ const F32 ANIMATED_OBJECT_BASE_COST = 15.0f;
const F32 ANIMATED_OBJECT_COST_PER_KTRI = 1.5f;
#endif
-