diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-25 22:01:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-25 22:01:01 +0400 |
commit | fa0c5a100da6afe58462709f2b3acf0f870112cb (patch) | |
tree | 498ceeac763d72dac8b39f86c823188f79c9cd4d /source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp | |
parent | 6badc77cb0de84286db9b0df365ff4e2c85ec7b9 (diff) |
fix for crash with blur - happened most when there was a size input, need to mutex lock before allocating the gauss array.
also add suspiciously missing call to BlurBaseOperation::initExecution, X had but Y was missing.
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp index 954aef7b916..2d78085e3b0 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp @@ -36,10 +36,12 @@ GaussianAlphaXBlurOperation::GaussianAlphaXBlurOperation() : BlurBaseOperation(C void *GaussianAlphaXBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers) { + lockMutex(); if (!this->sizeavailable) { updateGauss(memoryBuffers); } void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers); + unlockMutex(); return buffer; } @@ -47,6 +49,8 @@ void GaussianAlphaXBlurOperation::initExecution() { /* BlurBaseOperation::initExecution(); */ /* until we suppoer size input - comment this */ + initMutex(); + if (this->sizeavailable) { float rad = size * this->data->sizex; if (rad < 1) @@ -154,6 +158,8 @@ void GaussianAlphaXBlurOperation::deinitExecution() this->gausstab = NULL; delete [] this->distbuf_inv; this->distbuf_inv = NULL; + + deinitMutex(); } bool GaussianAlphaXBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) |