Index: libs/ardour/audio_track.cc
===================================================================
RCS file: /home/las/cvsroot/ardour/ardour/libs/ardour/audio_track.cc,v
retrieving revision 1.74
diff -u -r1.74 audio_track.cc
--- libs/ardour/audio_track.cc	6 Dec 2005 04:02:29 -0000	1.74
+++ libs/ardour/audio_track.cc	11 Dec 2005 16:15:37 -0000
@@ -571,7 +571,15 @@
 	Sample* tmpb;
 	jack_nframes_t transport_frame;
 
-	automation_snapshot (start_frame);
+	{ 
+		TentativeLockMonitor am (redirect_lock, __LINE__, __FILE__);
+		
+		if (am.locked()) {
+			// we need to take the redirect lock here because this
+			// method is called from two different thread contexts and accesses them
+			automation_snapshot (start_frame);
+		}
+	}
 
 	if (n_outputs() == 0 && _redirects.empty()) {
 		return 0;
