Fix: Translate node crashes for single inputs

The Translate node crashed for single inputs in the Full Frame
compositor, that's because it always assumed image inputs. So fix this
by handling the single value case.
This commit is contained in:
Omar Emara
2024-02-13 17:45:28 +02:00
parent 9fb17c1ca4
commit 8b46fdeab8

View File

@@ -112,6 +112,11 @@ void TranslateOperation::update_memory_buffer_partial(MemoryBuffer *output,
Span<MemoryBuffer *> inputs)
{
MemoryBuffer *input = inputs[0];
if (input->is_a_single_elem()) {
copy_v4_v4(output->get_elem(0, 0), input->get_elem(0, 0));
return;
}
const int delta_x = this->get_delta_x();
const int delta_y = this->get_delta_y();
for (int y = area.ymin; y < area.ymax; y++) {