From d6f8db673345501a29231890b52cbdfce4a8ecf8 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 26 Jul 2019 20:02:58 +0300 Subject: [PATCH] Don't add externally specified postprocessors as owned --- source/pipelinebuilder.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/pipelinebuilder.cpp b/source/pipelinebuilder.cpp index 286d6cb6..fcd5efbc 100644 --- a/source/pipelinebuilder.cpp +++ b/source/pipelinebuilder.cpp @@ -61,10 +61,14 @@ void PipelineBuilder::build(Pipeline &pipeline) const PostProcessor *proc = 0; if(!i->slot_name.empty()) proc = get_item(postprocessors, i->slot_name); - if(!proc && i->postprocessor_template) - proc = i->postprocessor_template->create(pipeline.get_width(), pipeline.get_height()); if(proc) - pipeline.add_postprocessor_owned(proc); + pipeline.add_postprocessor(*proc); + else if(i->postprocessor_template) + { + proc = i->postprocessor_template->create(pipeline.get_width(), pipeline.get_height()); + if(proc) + pipeline.add_postprocessor_owned(proc); + } } } -- 2.45.2