From 9f0313dd0ba0def05a7ec6934faba9ad82e484f6 Mon Sep 17 00:00:00 2001 From: Mathias Froehlich Date: Wed, 8 Jun 2011 13:42:30 +0200 Subject: [PATCH] Do not crash on exporting some EffectGeodes. --- simgear/scene/material/EffectGeode.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/simgear/scene/material/EffectGeode.cxx b/simgear/scene/material/EffectGeode.cxx index eac2f156..26eab385 100644 --- a/simgear/scene/material/EffectGeode.cxx +++ b/simgear/scene/material/EffectGeode.cxx @@ -96,8 +96,11 @@ bool EffectGeode_writeLocalData(const Object& obj, osgDB::Output& fw) { const EffectGeode& eg = static_cast(obj); - fw.indent() << "effect\n"; - fw.writeObject(*eg.getEffect()); + if (eg.getEffect()) { + fw.indent() << "effect\n"; + fw.writeObject(*eg.getEffect()); + } + return true; } -- 2.39.5