Skip to content

Commit

Permalink
#6195: Fix crash when trying to apply an anim to the null model
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Dec 26, 2022
1 parent b87f4a6 commit cb8cf72
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/entitylib.h
Expand Up @@ -243,6 +243,8 @@ inline void applyIdlePose(const INodePtr& node, const IModelDef::Ptr& modelDef)
// Set the animation to play
auto md5model = dynamic_cast<md5::IMD5Model*>(&(modelNode->getIModel()));

if (!md5model) return;

// Look up the "idle" anim if there is one
auto found = modelDef->getAnim("idle");

Expand Down

0 comments on commit cb8cf72

Please sign in to comment.