Ignore:
Timestamp:
06/12/14 12:08:33 (11 years ago)
Author:
epyon
Message:
  • animation may be nullptr
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gfx/keyframed_mesh.cc

    r251 r252  
    118118void nv::keyframed_mesh::run_animation( animation_entry* a_anim )
    119119{
    120         keyframed_animation_entry * anim = down_cast<keyframed_animation_entry>(a_anim);
    121         setup_animation( anim->m_start, anim->m_frames, anim->m_fps, anim->m_looping );
     120        if ( a_anim )
     121        {
     122                keyframed_animation_entry * anim = down_cast<keyframed_animation_entry>(a_anim);
     123                m_active = true;
     124                setup_animation( anim->m_start, anim->m_frames, anim->m_fps, anim->m_looping );
     125        }
     126        else
     127        {
     128                m_active = false;
     129        }
    122130}
    123131
Note: See TracChangeset for help on using the changeset viewer.