freeing node trees no longer decreases their user counts, this cause causing invalid memory access when freeing the blend file.
This commit is contained in:
@@ -1047,7 +1047,15 @@ void ntreeFreeTree_ex(bNodeTree *ntree, const short do_id_user)
|
|||||||
/* same as ntreeFreeTree_ex but always manage users */
|
/* same as ntreeFreeTree_ex but always manage users */
|
||||||
void ntreeFreeTree(bNodeTree *ntree)
|
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);
|
ntreeFreeTree_ex(ntree, TRUE);
|
||||||
|
#else
|
||||||
|
ntreeFreeTree_ex(ntree, FALSE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ntreeFreeCache(bNodeTree *ntree)
|
void ntreeFreeCache(bNodeTree *ntree)
|
||||||
|
@@ -79,10 +79,10 @@ void ZCombineAlphaOperation::executePixel(float output[4], float x, float y, Pix
|
|||||||
}
|
}
|
||||||
float fac = color1[3];
|
float fac = color1[3];
|
||||||
float ifac = 1.0f - fac;
|
float ifac = 1.0f - fac;
|
||||||
output[0] = fac*color1[0] + ifac * color2[0];
|
output[0] = fac * color1[0] + ifac * color2[0];
|
||||||
output[1] = fac*color1[1] + ifac * color2[1];
|
output[1] = fac * color1[1] + ifac * color2[1];
|
||||||
output[2] = fac*color1[2] + ifac * color2[2];
|
output[2] = fac * color1[2] + ifac * color2[2];
|
||||||
output[3] = MAX2(color1[3], color2[3]);
|
output[3] = max(color1[3], color2[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZCombineOperation::deinitExecution()
|
void ZCombineOperation::deinitExecution()
|
||||||
|
Reference in New Issue
Block a user