diff --git a/src/osgPlugins/md2/ReaderWriterMD2.cpp b/src/osgPlugins/md2/ReaderWriterMD2.cpp index e9d92c314..65dab9078 100644 --- a/src/osgPlugins/md2/ReaderWriterMD2.cpp +++ b/src/osgPlugins/md2/ReaderWriterMD2.cpp @@ -374,8 +374,12 @@ load_md2 (const char *filename, const osgDB::ReaderWriter::Options* options) osg::ref_ptr geode = new osg::Geode; geode->addDrawable (geom.get()); - current_sequence->addChild (geode.get()); - current_sequence->setTime (sequence_frame, 0.2f); + if (current_sequence) + { + current_sequence->addChild (geode.get()); + current_sequence->setTime (sequence_frame, 0.2f); + } + sequence_frame++; last_frame_name = frame->name;