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:
authorJeroen Bakker <j.bakker@atmind.nl>2012-06-22 17:24:43 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-06-22 17:24:43 +0400
commit65e9216ccea172ee09da0a5ecc6515d7b4c5e443 (patch)
treecf3fbfabe2153a0e5ca69516738642775ab5a9bb /source/blender/compositor/operations/COM_ReadBufferOperation.cpp
parentf73e023e54923890bdfd2e5f81a3d13866413f75 (diff)
Nullpointer exception happened when all input sockets of a (for example)
a translate node were connected with the same complex node (like lens distortion). Added a check to see if the list of buffers are available to resolve this issue.
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;
}
}