Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-07-11 10:08:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-07-11 10:17:08 +0300
commit6ea43f9aca81bab376b8f8878b6aeb4819ce251c (patch)
tree562911d0d5b6b5ed622debe87131066010b6b66c
parent0eb61baeccf2fc1875f3178722177975ffdcc5e8 (diff)
Fix sculpting high poly meshes
Attempted to free unallocated memory, interestingly nobody noticed this for ~7 years (error from 3078c806).
-rw-r--r--source/blender/blenkernel/intern/pbvh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 8afb5b2aafe..ff69f381b06 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -688,8 +688,7 @@ static void pbvh_stack_push(PBVHIter *iter, PBVHNode *node, bool revisiting)
{
if (UNLIKELY(iter->stacksize == iter->stackspace)) {
iter->stackspace *= 2;
-
- if (iter->stackspace != STACK_FIXED_DEPTH) {
+ if (iter->stackspace != (STACK_FIXED_DEPTH * 2)) {
iter->stack = MEM_reallocN(iter->stack, sizeof(PBVHStack) * iter->stackspace);
}
else {