From 7e294df84e26520e6beafe4fbf8c0ea0fed1f180 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 17 Jul 2008 20:58:33 -0500 Subject: [PATCH] Fix race condition in capture finalization. This race resulted in the failure to consistently redraw new captures in the proper color. --- Timeline/Engine/Record_DS.C | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Timeline/Engine/Record_DS.C b/Timeline/Engine/Record_DS.C index ff37d4e..8fff82f 100644 --- a/Timeline/Engine/Record_DS.C +++ b/Timeline/Engine/Record_DS.C @@ -198,12 +198,15 @@ Record_DS::disk_thread ( void ) DMESSAGE( "finalzing capture" ); - /* now finalize the recording */ - track()->finalize( _capture, _stop_frame ); + Track::Capture *c = _capture; - delete _capture; _capture = NULL; + /* now finalize the recording */ + track()->finalize( c, _stop_frame ); + + delete c; + _terminate = false; DMESSAGE( "capture thread gone" ); }