From: Mikko Rasa Date: Fri, 26 Jul 2019 17:02:58 +0000 (+0300) Subject: Don't add externally specified postprocessors as owned X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d6f8db673345501a29231890b52cbdfce4a8ecf8;p=libs%2Fgl.git Don't add externally specified postprocessors as owned --- 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); + } } }