Added handling of NULL pointer case

This commit is contained in:
Robert Osfield 2016-06-30 08:23:51 +01:00
parent 7f335fd528
commit fec64f6d8c

View File

@ -374,8 +374,12 @@ load_md2 (const char *filename, const osgDB::ReaderWriter::Options* options)
osg::ref_ptr<osg::Geode> geode = new osg::Geode; osg::ref_ptr<osg::Geode> geode = new osg::Geode;
geode->addDrawable (geom.get()); geode->addDrawable (geom.get());
if (current_sequence)
{
current_sequence->addChild (geode.get()); current_sequence->addChild (geode.get());
current_sequence->setTime (sequence_frame, 0.2f); current_sequence->setTime (sequence_frame, 0.2f);
}
sequence_frame++; sequence_frame++;
last_frame_name = frame->name; last_frame_name = frame->name;