mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-12 07:35:51 +01:00
fix for P1 "repeatable crash set format to 16-bit..." thread
This commit is contained in:
@@ -229,12 +229,16 @@ bool Sequence::ConvertToSampleFormat(sampleFormat format, bool* pbChanged)
|
|||||||
|
|
||||||
if (bSuccess)
|
if (bSuccess)
|
||||||
{
|
{
|
||||||
// Invalidate all the old block files.
|
// Invalidate all the old, non-aliased block files.
|
||||||
|
// Aliased files will be converted at save, per comment above.
|
||||||
for (size_t i = 0; (i < mBlock->GetCount() && bSuccess); i++)
|
for (size_t i = 0; (i < mBlock->GetCount() && bSuccess); i++)
|
||||||
{
|
{
|
||||||
SeqBlock* pOldSeqBlock = mBlock->Item(i);
|
SeqBlock* pOldSeqBlock = mBlock->Item(i);
|
||||||
mDirManager->Deref(pOldSeqBlock->f);
|
if (!pOldSeqBlock->f->IsAlias())
|
||||||
pOldSeqBlock->f = NULL; //vvvvv ...so we don't delete the file when we delete mBlock, next. ANSWER-ME: Right, or delete?
|
{
|
||||||
|
mDirManager->Deref(pOldSeqBlock->f);
|
||||||
|
pOldSeqBlock->f = NULL; //vvvvv ...so we don't delete the file when we delete mBlock, next. ANSWER-ME: Right, or delete?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
delete mBlock;
|
delete mBlock;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user