mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-18 09:00:52 +02:00
Fix a null dereference found by Pvs-studio...
... I think the other examples flagged by it are provably redundant null-checks after uses of pointers, not really bugs
This commit is contained in:
parent
31b820b47c
commit
1960762308
@ -4090,14 +4090,15 @@ void AudacityProject::AddImportedTracks(const wxString &fileName,
|
|||||||
// remember this to show a warning later
|
// remember this to show a warning later
|
||||||
if (newTrack->GetKind() == WaveTrack::Wave)
|
if (newTrack->GetKind() == WaveTrack::Wave)
|
||||||
{
|
{
|
||||||
WaveClip* clip = ((WaveTrack*)newTrack)->GetClipByIndex(0);
|
if (WaveClip* clip = ((WaveTrack*)newTrack)->GetClipByIndex(0)) {
|
||||||
BlockArray &blocks = clip->GetSequence()->GetBlockArray();
|
BlockArray &blocks = clip->GetSequence()->GetBlockArray();
|
||||||
if (clip && blocks.size())
|
if (blocks.size())
|
||||||
{
|
|
||||||
SeqBlock& block = blocks[0];
|
|
||||||
if (block.f->IsAlias())
|
|
||||||
{
|
{
|
||||||
mImportedDependencies = true;
|
SeqBlock& block = blocks[0];
|
||||||
|
if (block.f->IsAlias())
|
||||||
|
{
|
||||||
|
mImportedDependencies = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user