mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-31 01:20:23 +00:00
Handle case in the editor when actor's bodypart was not found
This commit is contained in:
parent
c114e1278e
commit
0065bccf24
@ -113,7 +113,9 @@ namespace CSMWorld
|
||||
const std::string ActorAdapter::ActorData::getPart(ESM::PartReferenceType index) const
|
||||
{
|
||||
auto it = mParts.find(index);
|
||||
if (it == mParts.end() && mRaceData && mRaceData->handlesPart(index))
|
||||
if (it == mParts.end())
|
||||
{
|
||||
if (mRaceData && mRaceData->handlesPart(index))
|
||||
{
|
||||
if (mFemale)
|
||||
{
|
||||
@ -126,6 +128,9 @@ namespace CSMWorld
|
||||
return mRaceData->getMalePart(index);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
const std::string& partName = it->second.first;
|
||||
return partName;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user