potential fix for crashing bug caused by mutex lifetime in ~AudioDiskstream

git-svn-id: svn://localhost/ardour2/trunk@1231 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2006-12-19 16:21:24 +00:00
parent 434f3e6296
commit 27cf4b989c

View file

@ -168,12 +168,18 @@ AudioDiskstream::destroy_channel (ChannelInfo &chan)
AudioDiskstream::~AudioDiskstream ()
{
Glib::Mutex::Lock lm (state_lock);
{
/* don't be holding this lock as we exit the destructor, glib will wince
visibly since the mutex gets destroyed before we release it.
*/
for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan)
destroy_channel((*chan));
channels.clear();
Glib::Mutex::Lock lm (state_lock);
for (ChannelList::iterator chan = channels.begin(); chan != channels.end(); ++chan)
destroy_channel((*chan));
channels.clear();
}
}
void