Fixed: #5 Applied check to validate parent skeleton is valid, patch provided by Vinicius Arroya.

This commit is contained in:
mattraykowski 2013-01-30 09:54:55 -06:00
parent ddfc526d0c
commit 302d4bd5c9

View file

@ -197,7 +197,7 @@ void CAttachedFX::create(CCharacterCL &parent,
if (targeterInfo.StickMode.UserBoneName != 0)
{
CEntityCL *targeter = EntitiesMngr.entity(TargeterInfo.Slot);
if (targeter && targeter->skeleton())
if (parent.skeleton() && targeter && targeter->skeleton())
{
TargeterUserBoneID = parent.skeleton()->getBoneIdByName(NLMISC::CStringMapper::unmap(TargeterInfo.StickMode.UserBoneName));
}