]> git.tdb.fi Git - libs/gl.git/commitdiff
Throw if trying to render an Object without a Technique
authorMikko Rasa <tdb@tdb.fi>
Mon, 9 Sep 2013 15:57:21 +0000 (18:57 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 9 Sep 2013 15:57:21 +0000 (18:57 +0300)
source/object.cpp

index 6bc872a198553eb38aa65ae67052b32ace758597..ae38af6b4e7f2c9274206561759bfdef4d442987 100644 (file)
@@ -103,7 +103,9 @@ void Object::render(Renderer &renderer, const ObjectInstance &inst, const Tag &t
 
 const RenderPass *Object::get_pass(const Tag &tag) const
 {
-       if(!technique || !technique->has_pass(tag))
+       if(!technique)
+               throw logic_error("!technique");
+       if(!technique->has_pass(tag))
                return 0;
        return &technique->get_pass(tag);
 }