diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp b/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp index 5f088188fbf9..71c44157afa2 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp @@ -367,7 +367,8 @@ SelectedIntervalOfFocusedTrack(AudacityProject &project) return interval->Start() == viewInfo.selectedRegion.t0() && interval->End() == viewInfo.selectedRegion.t1(); }); - if(it != ChannelGroup::IntervalIterator { }) + + if(it != intervals.end()) return { pWaveTrack, it }; } }