From e7397b9f23b0805be5b79888e8db09f89446d554 Mon Sep 17 00:00:00 2001 From: richardash1981 Date: Mon, 29 Aug 2011 10:16:11 +0000 Subject: [PATCH] Fix crash when mix-and-rendering a single, panned, mono track because we have m,ono input and stereo output. Name should be an attribute of a track object whih is singular, regardless of number of channels! --- src/Mix.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Mix.cpp b/src/Mix.cpp index c83705a8d..bdca70fd2 100644 --- a/src/Mix.cpp +++ b/src/Mix.cpp @@ -134,8 +134,12 @@ bool MixAndRender(TrackList *tracks, TrackFactory *trackFactory, } else { mixRight = trackFactory->NewWaveTrack(format, rate); - if (oneinput) - mixLeft->SetName(usefulIter.First()->GetLink()->GetName()); /* set name to match input track's right channel!*/ + if (oneinput) { + if (usefulIter.First()->GetLink() != NULL) // we have linked track + mixLeft->SetName(usefulIter.First()->GetLink()->GetName()); /* set name to match input track's right channel!*/ + else + mixLeft->SetName(usefulIter.First()->GetName()); /* set name to that of sole input channel */ + } else mixRight->SetName(_("Mix")); mixLeft->SetChannel(Track::LeftChannel);