Skip to content

Commit

Permalink
Check AddBvnAnimation return value (#1750)
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <[email protected]>

Signed-off-by: Nate Koenig <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Co-authored-by: Nate Koenig <[email protected]>
Co-authored-by: Michael Carroll <[email protected]>
  • Loading branch information
3 people authored Nov 23, 2022
1 parent 6bc33a2 commit 04618d7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/rendering/SceneManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2299,7 +2299,14 @@ SceneManager::LoadAnimations(const sdf::Actor &_actor)
}
}
if (addAnim)
meshSkel->AddBvhAnimation(animFilename, animScale);
{
if (!meshSkel->AddBvhAnimation(animFilename, animScale))
{
ignerr << "Bvh animation in file " << animFilename
<< " failed to load during actor creation" << std::endl;
continue;
}
}
mapAnimNameId[animName] = numAnims++;
}
else if (extension == "dae")
Expand Down

0 comments on commit 04618d7

Please sign in to comment.