Index: libs/ardour/route.cc
===================================================================
RCS file: /home/las/cvsroot/ardour/ardour/libs/ardour/route.cc,v
retrieving revision 1.173
diff -u -r1.173 route.cc
--- libs/ardour/route.cc	9 Sep 2005 12:43:30 -0000	1.173
+++ libs/ardour/route.cc	9 Dec 2005 04:51:44 -0000
@@ -1935,12 +1935,14 @@
 {
 	jack_nframes_t now = _session.transport_frame();
 
-	if (!did_locate) {
-		automation_snapshot (now);
-	}
-
 	{
 		LockMonitor lm (redirect_lock, __LINE__, __FILE__);
+
+		if (!did_locate) {
+			automation_snapshot (now);
+		}
+
+
 		for (RedirectList::iterator i = _redirects.begin(); i != _redirects.end(); ++i) {
 			
 			if (Config->get_plugins_stop_with_transport() && can_flush_redirects) {
@@ -2053,7 +2055,15 @@
 Route::roll (jack_nframes_t nframes, jack_nframes_t start_frame, jack_nframes_t end_frame, jack_nframes_t offset, int declick,
 	     bool can_record, bool rec_monitors_input)
 {
-	automation_snapshot (_session.transport_frame());
+	{ 
+		TentativeLockMonitor am (redirect_lock, __LINE__, __FILE__);
+		
+		if (am.locked()) {
+			// we need to take the redirect lock out here because this
+			// method is called from two different thread contexts and accesses them
+			automation_snapshot (_session.transport_frame());
+		}
+	}
 
 	if ((n_outputs() == 0 && _redirects.empty()) || n_inputs() == 0 || !_active) {
 		silence (nframes, offset);
