Fix crash in race dialog when no head or hair are available

pull/1/head
scrawl 9 years ago
parent a45643f150
commit 9eab3b1728

@ -326,8 +326,11 @@ namespace MWGui
record.mRace = mCurrentRaceId;
record.setIsMale(mGenderIndex == 0);
record.mHead = mAvailableHeads[mFaceIndex];
record.mHair = mAvailableHairs[mHairIndex];
if (mFaceIndex >= 0 && mFaceIndex < int(mAvailableHeads.size()))
record.mHead = mAvailableHeads[mFaceIndex];
if (mHairIndex >= 0 && mHairIndex < int(mAvailableHairs.size()))
record.mHair = mAvailableHairs[mHairIndex];
try
{

Loading…
Cancel
Save