From: Mikko Rasa Date: Mon, 9 Sep 2013 15:57:21 +0000 (+0300) Subject: Throw if trying to render an Object without a Technique X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=908354182fd2b0e7748b8778e469133d48f88bbb;p=libs%2Fgl.git Throw if trying to render an Object without a Technique --- diff --git a/source/object.cpp b/source/object.cpp index 6bc872a1..ae38af6b 100644 --- a/source/object.cpp +++ b/source/object.cpp @@ -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); }