From: Mikko Rasa Date: Tue, 19 Oct 2021 12:00:38 +0000 (+0300) Subject: Require all renderables to be present when building a sequence X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b8b7c6b251cace40021bdfacc6aa17242aa51e1d;p=libs%2Fgl.git Require all renderables to be present when building a sequence --- diff --git a/source/builders/sequencebuilder.cpp b/source/builders/sequencebuilder.cpp index 5af62127..eff9348b 100644 --- a/source/builders/sequencebuilder.cpp +++ b/source/builders/sequencebuilder.cpp @@ -61,7 +61,7 @@ void SequenceBuilder::build(Sequence &sequence) const { Renderable *renderable = get_item(renderables, s.renderable_name); if(!renderable) - continue; + throw missing_renderable(s.renderable_name); Sequence::Step &step = sequence.add_step(s.tag, *renderable); step.set_depth_test(s.depth_test); @@ -92,6 +92,9 @@ void SequenceBuilder::build(Sequence &sequence) const sequence.add_owned(proc.release()); } } + + if(!proc) + throw invalid_operation("SequenceBuilder::build"); } }