From Javier Taibo, " In current SVN code, when exporting an osgParticle::Particle object to the .osg file format, it crashes if no drawable was set in the particle.
In the attached file (src/osgWrappers/deprecated-dotosg/osgParticle/IO_Particle.cpp) I have added a check for the existence of the drawable before writing it to the file. "
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user