]> git.tdb.fi Git - libs/gl.git/commitdiff
Require all renderables to be present when building a sequence
authorMikko Rasa <tdb@tdb.fi>
Tue, 19 Oct 2021 12:00:38 +0000 (15:00 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 19 Oct 2021 12:37:58 +0000 (15:37 +0300)
source/builders/sequencebuilder.cpp

index 5af62127ca4ff02712390793e70ec2735a401e7c..eff9348b8395a78226436110633a400c9e373d26 100644 (file)
@@ -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");
        }
 }