From e5cbf1607a24fe4bfb243bffedf90dc6ef5af8ff Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 14 Oct 2020 11:47:54 +0300 Subject: [PATCH] SL-14119 Crash at LLVolumeFace::cacheOptimize --- indra/llinventory/llinventory.h | 2 +- indra/llmath/llvolume.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index 70b200e139..96659cd602 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -247,7 +247,7 @@ public: LLInventoryCategory(const LLInventoryCategory* other); void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy protected: - ~LLInventoryCategory(); + virtual ~LLInventoryCategory(); //-------------------------------------------------------------------- // Accessors And Mutators diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 9abe8d1082..1ebd42babd 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5294,9 +5294,9 @@ public: LLVCacheTriangleData* tri = *iter; if (tri->mActive) { - tri->mScore = tri->mVertex[0]->mScore; - tri->mScore += tri->mVertex[1]->mScore; - tri->mScore += tri->mVertex[2]->mScore; + tri->mScore = tri->mVertex[0] ? tri->mVertex[0]->mScore : 0; + tri->mScore += tri->mVertex[1] ? tri->mVertex[1]->mScore : 0; + tri->mScore += tri->mVertex[2] ? tri->mVertex[2]->mScore : 0; if (!mBestTriangle || mBestTriangle->mScore < tri->mScore) {