1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00
This commit is contained in:
v.audacity 2012-08-20 03:08:15 +00:00
parent dc2d11b1d6
commit bd55ab0ff0

View File

@ -2570,8 +2570,17 @@ void TrackPanel::HandleSlide(wxMouseEvent & event)
if (mCapturedTrack->GetKind() == Track::Wave) // Should always be true here, but make sure.
{
WaveTrack* pWaveTrack = (WaveTrack*)mCapturedTrack;
mCapturedClipArray[i].clip->Resample(pWaveTrack->GetRate());
mCapturedClipArray[i].clip->MarkChanged();
WaveClip* pWaveClip = mCapturedClipArray[i].clip;
//vvvvv FIX-ME: I think that at this point, mCapturedClipArray has
// the wrong clips if we're dragging a clip to another track, per bug 367.
// Probably, mCapturedClipArray does not match mCapturedTrack.
// Then if the mCapturedClipArray.GetCount() is wrong, pWaveClip can be NULL.
// This conditional is just a failsafe against crash on NULL deref.
if (pWaveClip)
{
pWaveClip->Resample(pWaveTrack->GetRate());
pWaveClip->MarkChanged();
}
}
SetCapturedTrack( NULL );