From d73b1593ac940e91906f75359a06c4a06fc1b6ac Mon Sep 17 00:00:00 2001 From: John Dancel Date: May 21 2019 23:56:21 +0000 Subject: Fix crash writing edit frame range temp files --- diff --git a/toonz/sources/toonzlib/txshsimplelevel.cpp b/toonz/sources/toonzlib/txshsimplelevel.cpp index c1c5a31..cee4053 100644 --- a/toonz/sources/toonzlib/txshsimplelevel.cpp +++ b/toonz/sources/toonzlib/txshsimplelevel.cpp @@ -1432,6 +1432,8 @@ void TXshSimpleLevel::save(const TFilePath &fp, const TFilePath &oldFp, sl->setPath(getScene()->codeFilePath(app)); sl->setType(getType()); sl->setDirtyFlag(getDirtyFlag()); + sl->addRef(); // Needed so levelUpdater doesn't destroy it right away + // when its done writing std::set::iterator eft, efEnd = m_editableRange.end(); for (eft = m_editableRange.begin(); eft != efEnd; ++eft) {