summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-05-05 19:41:56 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-05-05 19:41:56 +0300
commit43517c5adc69ecb1d8a5e031a9e2840b005eecf9 (patch)
tree0bfb56fe055f700b66c73efffab741c69925e9f3 /indra/llmath/llvolume.cpp
parentf3add82a4c7f34bfff285302c34d952902451cad (diff)
SL-17244 Fix 'empty leaf' crashes
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 3727ce85af..5099920f32 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -414,7 +414,7 @@ public:
max.setMax(max, *tri->mV[2]);
}
}
- else if (!branch->isLeaf())
+ else if (branch->getChildCount() > 0)
{ //no data, but child nodes exist
LLVolumeOctreeListener* child = (LLVolumeOctreeListener*) branch->getChild(0)->getListener(0);
@@ -424,7 +424,7 @@ public:
}
else
{
- LL_ERRS() << "Empty leaf" << LL_ENDL;
+ llassert(!branch->isLeaf()); // Empty leaf
}
for (S32 i = 0; i < branch->getChildCount(); ++i)