Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations/COM_ReadBufferOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index d82294dd8a6..857131950dd 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -48,14 +48,21 @@ void ReadBufferOperation::determineResolution(unsigned int resolution[], unsigne
}
void ReadBufferOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
- MemoryBuffer *inputBuffer = inputBuffers[this->offset];
- if (inputBuffer) {
- if (sampler == COM_PS_NEAREST) {
- inputBuffer->read(color, x, y);
- }
- else {
- inputBuffer->readCubic(color, x, y);
+ if (inputBuffers) {
+ MemoryBuffer *inputBuffer = inputBuffers[this->offset];
+ if (inputBuffer) {
+ if (sampler == COM_PS_NEAREST) {
+ inputBuffer->read(color, x, y);
+ }
+ else {
+ inputBuffer->readCubic(color, x, y);
+ }
}
+ } else {
+ color[0] = 0.0f;
+ color[1] = 0.0f;
+ color[2] = 0.0f;
+ color[3] = 0.0f;
}
}