From b8b7c6b251cace40021bdfacc6aa17242aa51e1d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 19 Oct 2021 15:00:38 +0300 Subject: [PATCH] Require all renderables to be present when building a sequence --- source/builders/sequencebuilder.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); } } -- 2.45.2