mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-15 16:14:11 +02:00
fix for P1 "repeatable crash set format to 16-bit..." thread
This commit is contained in:
parent
1f688cfb85
commit
c699aa601d
@ -229,12 +229,16 @@ bool Sequence::ConvertToSampleFormat(sampleFormat format, bool* pbChanged)
|
||||
|
||||
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++)
|
||||
{
|
||||
SeqBlock* pOldSeqBlock = mBlock->Item(i);
|
||||
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?
|
||||
if (!pOldSeqBlock->f->IsAlias())
|
||||
{
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user