Fix: Crash in single value input to Glare node
The Glare node crashes in the full-frame compositor when its input is a single value. Since the Glare node is constant foldable, do not inflate its input and instead output a single value.
This commit is contained in:
@@ -75,17 +75,14 @@ void GlareBaseOperation::update_memory_buffer(MemoryBuffer *output,
|
||||
{
|
||||
if (!is_output_rendered_) {
|
||||
MemoryBuffer *input = inputs[0];
|
||||
const bool is_input_inflated = input->is_a_single_elem();
|
||||
if (is_input_inflated) {
|
||||
input = input->inflate();
|
||||
if (input->is_a_single_elem()) {
|
||||
copy_v4_v4(output->get_elem(0, 0), input->get_elem(0, 0));
|
||||
is_output_rendered_ = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this->generate_glare(output->get_buffer(), input, settings_);
|
||||
is_output_rendered_ = true;
|
||||
|
||||
if (is_input_inflated) {
|
||||
delete input;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user