Do not crash on exporting some EffectGeodes.

This commit is contained in:
Mathias Froehlich
2011-06-08 13:42:30 +02:00
parent 3d109f9c4c
commit 9f0313dd0b

View File

@@ -96,8 +96,11 @@ bool EffectGeode_writeLocalData(const Object& obj, osgDB::Output& fw)
{
const EffectGeode& eg = static_cast<const EffectGeode&>(obj);
fw.indent() << "effect\n";
fw.writeObject(*eg.getEffect());
if (eg.getEffect()) {
fw.indent() << "effect\n";
fw.writeObject(*eg.getEffect());
}
return true;
}