mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 02:06:43 +00:00
Avoid null pointer dereference
This commit is contained in:
parent
af41e9acc1
commit
ca2a524a5f
1 changed files with 1 additions and 1 deletions
|
@ -539,7 +539,7 @@ std::string NpcAnimation::getShieldMesh(MWWorld::ConstPtr shield) const
|
|||
{
|
||||
const ESM::BodyPart *bodypart = 0;
|
||||
bodypart = partStore.search(bodypartName);
|
||||
if (bodypart->mData.mType != ESM::BodyPart::MT_Armor)
|
||||
if (bodypart == nullptr || bodypart->mData.mType != ESM::BodyPart::MT_Armor)
|
||||
return "";
|
||||
else if (!bodypart->mModel.empty())
|
||||
mesh = "meshes\\" + bodypart->mModel;
|
||||
|
|
Loading…
Reference in a new issue