From: Tim Moore Date: Fri, 18 Sep 2009 13:43:46 +0000 (+0200) Subject: check for null effect in EffectCullVisitor X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3456434e37755eb3166fa839bb610538f5fdd46b;p=simgear.git check for null effect in EffectCullVisitor An EffectGeode might not have any effect. --- diff --git a/simgear/scene/material/EffectCullVisitor.cxx b/simgear/scene/material/EffectCullVisitor.cxx index a1a4fa82..62952a9f 100644 --- a/simgear/scene/material/EffectCullVisitor.cxx +++ b/simgear/scene/material/EffectCullVisitor.cxx @@ -54,8 +54,9 @@ void EffectCullVisitor::apply(osg::Geode& node) CullVisitor::apply(node); return; } - Technique* technique = eg->getEffect()->chooseTechnique(&getRenderInfo()); - if (!technique) { + Effect* effect = eg->getEffect(); + Technique* technique = 0; + if (!(effect && (technique = effect->chooseTechnique(&getRenderInfo())))) { CullVisitor::apply(node); return; }