mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Avoid null pointer dereference
This commit is contained in:
parent
af41e9acc1
commit
ca2a524a5f
@ -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…
x
Reference in New Issue
Block a user