From 8ea1f4a3fc77145cb60a7b8182e0da9c0e43ed69 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 14 Dec 2023 22:51:18 +0200 Subject: SL-15628 Crash inside ~LLModelInstanceBase More explicit cleanup in hopes of narrowing down which of the models failed --- indra/llprimitive/llmodel.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/llprimitive/llmodel.h') diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index 4505d6b3b9..040257e00e 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -106,6 +106,8 @@ public: std::vector mPositions; std::vector mNormals; + ~PhysicsMesh() {} + void clear() { mPositions.clear(); @@ -131,6 +133,7 @@ public: public: Decomposition() { } Decomposition(LLSD& data); + ~Decomposition() { } void fromLLSD(LLSD& data); LLSD asLLSD() const; bool hasHullList() const; @@ -365,7 +368,7 @@ class LLModelInstanceBase { public: LLPointer mModel; - LLPointer mLOD[5]; + LLPointer mLOD[LLModel::NUM_LODS]; LLUUID mMeshID; LLMatrix4 mTransform; @@ -380,6 +383,15 @@ public: : mModel(NULL) { } + + virtual ~LLModelInstanceBase() + { + mModel = NULL; + for (int j = 0; j < LLModel::NUM_LODS; ++j) + { + mLOD[j] = NULL; + } + }; }; typedef std::vector model_instance_list; @@ -399,6 +411,8 @@ public: LLModelInstance(LLSD& data); + ~LLModelInstance() {} + LLSD asLLSD(); }; -- cgit v1.2.3