diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_ImageOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ImageOperation.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp index bf9ad441803..3a60b1c84a3 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.cpp +++ b/source/blender/compositor/operations/COM_ImageOperation.cpp @@ -66,12 +66,14 @@ ImBuf *BaseImageOperation::getImBuf() ImBuf *ibuf; ImageUser iuser = *this->m_imageUser; - if (this->m_image == NULL) + if (this->m_image == NULL) { return NULL; + } /* local changes to the original ImageUser */ - if (BKE_image_is_multilayer(this->m_image) == false) + if (BKE_image_is_multilayer(this->m_image) == false) { iuser.multi_index = BKE_scene_multiview_view_id_get(this->m_rd, this->m_viewName); + } ibuf = BKE_image_acquire_ibuf(this->m_image, &iuser, NULL); if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) { @@ -194,8 +196,9 @@ void ImageDepthOperation::executePixelSampled(float output[4], output[0] = 0.0f; } else { - if (x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight()) + if (x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight()) { output[0] = 0.0f; + } else { int offset = y * this->m_width + x; output[0] = this->m_depthBuffer[offset]; |