Fix saving partial locked file in endless loop

This commit is contained in:
John Dancel 2019-05-15 16:02:34 -04:00
parent 35a3a8bd7e
commit 334bbe9072

View file

@ -1432,7 +1432,7 @@ void TXshSimpleLevel::save(const TFilePath &fp, const TFilePath &oldFp,
sl->setPath(getScene()->codeFilePath(app));
sl->setType(getType());
std::set<TFrameId>::iterator eft, efEnd;
std::set<TFrameId>::iterator eft, efEnd = m_editableRange.end();
for (eft = m_editableRange.begin(); eft != efEnd; ++eft) {
const TFrameId &fid = *eft;
sl->setFrame(fid, getFrame(fid, false));
@ -2200,9 +2200,8 @@ TFilePath TXshSimpleLevel::getExistingHookFile(
}
assert(h >= 0);
return (h < 0) ? TFilePath()
: decodedLevelPath.getParentDir() +
TFilePath(hookFiles[h].toStdWString());
return (h < 0) ? TFilePath() : decodedLevelPath.getParentDir() +
TFilePath(hookFiles[h].toStdWString());
}
//-----------------------------------------------------------------------------