Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix saving partial locked file in endless loop

John Dancel334bbe90722d
diff --git a/toonz/sources/toonzlib/txshsimplelevel.cpp b/toonz/sources/toonzlib/txshsimplelevel.cpp
index ad03350d0..f2dbccefb 100644
--- a/toonz/sources/toonzlib/txshsimplelevel.cpp
+++ b/toonz/sources/toonzlib/txshsimplelevel.cpp
@@ -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());
}
//-----------------------------------------------------------------------------