diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-06-02 23:55:57 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-06-02 23:55:57 +0400 |
commit | 834492489ab9cea37ff32166895b6a298d7225e9 (patch) | |
tree | a77ad78a46a07470c9029b71a909657f8f8d959e /source/blender/compositor/operations | |
parent | d8c2709414ec3b25c2bdaeea57eb26c2ff91f977 (diff) |
Fix #35599: MovieClip node crashes when using multilayer exr
Multilayer EXR is not supported as a source for movie clip yet,
but there's no excuse to crash!
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_MovieClipOperation.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp index a74f2c7299b..7b5c2e823ac 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp @@ -88,19 +88,25 @@ void MovieClipBaseOperation::determineResolution(unsigned int resolution[2], uns void MovieClipBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { - if (this->m_movieClipBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) { + ImBuf *ibuf = this->m_movieClipBuffer; + + if (ibuf == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) { + zero_v4(output); + } + if (ibuf->rect == NULL && ibuf->rect_float == NULL) { + /* Happens for multilayer exr, i.e. */ zero_v4(output); } else { switch (sampler) { case COM_PS_NEAREST: - nearest_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y); + nearest_interpolation_color(ibuf, NULL, output, x, y); break; case COM_PS_BILINEAR: - bilinear_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y); + bilinear_interpolation_color(ibuf, NULL, output, x, y); break; case COM_PS_BICUBIC: - bicubic_interpolation_color(this->m_movieClipBuffer, NULL, output, x, y); + bicubic_interpolation_color(ibuf, NULL, output, x, y); break; } } |