Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv27461

Modified Files:
        WaveTrack.cpp 
Log Message:
Fixes problem of a merging a split which is in only one track of a linked pair.

Index: WaveTrack.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/WaveTrack.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- WaveTrack.cpp       4 Jul 2007 10:16:41 -0000       1.105
+++ WaveTrack.cpp       30 Jul 2007 21:40:00 -0000      1.106
@@ -1394,7 +1394,10 @@
 
 WaveClip* WaveTrack::GetClipByIndex(int index)
 {
-   return mClips.Item(index)->GetData();
+   if(index < mClips.GetCount())
+      return mClips.Item(index)->GetData();
+   else
+      return NULL;
 }
 
 int WaveTrack::GetNumClips() const
@@ -1668,6 +1671,9 @@
 {
    WaveClip* clip1 = GetClipByIndex(clipidx1);
    WaveClip* clip2 = GetClipByIndex(clipidx2);
+
+   if(clip2 == NULL) // could happen if one track of a linked pair had a split 
and the other didn't
+      return false;
    
    // Append data from second clip to first clip
    if (!clip1->Paste(clip1->GetEndTime(), clip2))


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to