forked from teamnwah/openmw-tes3coop
handle missing land texture records properly during merge
This commit is contained in:
parent
73f6efddcc
commit
09ec60fe2a
1 changed files with 28 additions and 21 deletions
|
@ -164,6 +164,10 @@ void CSMTools::MergeLandTexturesStage::perform (int stage, CSMDoc::Messages& mes
|
|||
if (stage==0)
|
||||
mNext = mState.mTextureIndices.begin();
|
||||
|
||||
bool found = false;
|
||||
|
||||
do
|
||||
{
|
||||
if (mNext==mState.mTextureIndices.end())
|
||||
return;
|
||||
|
||||
|
@ -189,10 +193,13 @@ void CSMTools::MergeLandTexturesStage::perform (int stage, CSMDoc::Messages& mes
|
|||
CSMWorld::RecordBase::State_ModifiedOnly, 0, &texture);
|
||||
|
||||
mState.mTarget->getData().getLandTextures().appendRecord (newRecord);
|
||||
|
||||
found = true;
|
||||
}
|
||||
/// \todo deal with missing textures (either abort merge or report and make sure OpenMW can deal with missing textures)
|
||||
|
||||
++mNext;
|
||||
}
|
||||
while (!found);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue