diff --git a/src/osgWrappers/deprecated-dotosg/osgParticle/IO_Particle.cpp b/src/osgWrappers/deprecated-dotosg/osgParticle/IO_Particle.cpp index 204725f4f..efb255e2c 100644 --- a/src/osgWrappers/deprecated-dotosg/osgParticle/IO_Particle.cpp +++ b/src/osgWrappers/deprecated-dotosg/osgParticle/IO_Particle.cpp @@ -249,12 +249,14 @@ void write_particle(const osgParticle::Particle &P, osgDB::Output &fw) fw.writeObject(*P.getColorInterpolator()); fw.moveOut(); fw.indent() << "}" << std::endl; - - fw.indent() << "drawable {" << std::endl; - fw.moveIn(); - fw.writeObject(*P.getDrawable()); - fw.moveOut(); - fw.indent() << "}" << std::endl; + + if ( P.getDrawable() != NULL ) { + fw.indent() << "drawable {" << std::endl; + fw.moveIn(); + fw.writeObject(*P.getDrawable()); + fw.moveOut(); + fw.indent() << "}" << std::endl; + } fw.moveOut(); fw.indent() << "}" << std::endl;