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:
-rw-r--r--source/blender/blenkernel/intern/node.c8
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.cpp8
2 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index ade418e409f..1760b3ad03a 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1047,7 +1047,15 @@ void ntreeFreeTree_ex(bNodeTree *ntree, const short do_id_user)
/* same as ntreeFreeTree_ex but always manage users */
void ntreeFreeTree(bNodeTree *ntree)
{
+ /* XXX, this is correct, however when freeing the entire database
+ * this ends up accessing freed data which isn't properly unlinking
+ * its self from scene nodes, SO - for now prefer invalid usercounts
+ * on free rather then bad memory access - Campbell */
+#if 0
ntreeFreeTree_ex(ntree, TRUE);
+#else
+ ntreeFreeTree_ex(ntree, FALSE);
+#endif
}
void ntreeFreeCache(bNodeTree *ntree)
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
index c3ae42a6d8a..5e4f90b0269 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
@@ -79,10 +79,10 @@ void ZCombineAlphaOperation::executePixel(float output[4], float x, float y, Pix
}
float fac = color1[3];
float ifac = 1.0f - fac;
- output[0] = fac*color1[0] + ifac * color2[0];
- output[1] = fac*color1[1] + ifac * color2[1];
- output[2] = fac*color1[2] + ifac * color2[2];
- output[3] = MAX2(color1[3], color2[3]);
+ output[0] = fac * color1[0] + ifac * color2[0];
+ output[1] = fac * color1[1] + ifac * color2[1];
+ output[2] = fac * color1[2] + ifac * color2[2];
+ output[3] = max(color1[3], color2[3]);
}
void ZCombineOperation::deinitExecution()