mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
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:
parent
434f3e6296
commit
27cf4b989c
1 changed files with 11 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue