From 389b4feec16e8fba071fd890eef107ce207a76ff Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 24 Aug 2016 11:20:13 +0200 Subject: Fix T49128: Ghost of Previous Mask appears in Double Edge Mask Patch by Ted Schundler (tschundler), thanks! Differential Revision: https://developer.blender.org/D2163 --- .../blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp index 76afedf4b2a..ca3c5f7b069 100644 --- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp +++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp @@ -20,6 +20,8 @@ * Monique Dewanchand */ +#include + #include "COM_DoubleEdgeMaskOperation.h" #include "BLI_math.h" #include "DNA_node_types.h" @@ -1151,12 +1153,13 @@ void DoubleEdgeMaskOperation::doDoubleEdgeMask(float *imask, float *omask, float if (true) { // if both input sockets have some data coming in... - t = (this->getWidth() * this->getHeight()) - 1; // determine size of the frame + rw = this->getWidth(); // width of a row of pixels + t = (rw * this->getHeight()) - 1; // determine size of the frame + memset(res, 0, sizeof(float) * (t + 1)); // clear output buffer (not all pixels will be written later) lres = (unsigned int *)res; // unsigned int pointer to output buffer (for bit level ops) limask = (unsigned int *)imask; // unsigned int pointer to input mask (for bit level ops) lomask = (unsigned int *)omask; // unsigned int pointer to output mask (for bit level ops) - rw = this->getWidth(); // width of a row of pixels /* -- cgit v1.2.3