From 908354182fd2b0e7748b8778e469133d48f88bbb Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 9 Sep 2013 18:57:21 +0300 Subject: [PATCH] Throw if trying to render an Object without a Technique --- source/object.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.45.2