13
0

Hopefully fix race between engine being halted and butler

being destroyed.


git-svn-id: svn://localhost/ardour2/branches/3.0@12722 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-06-14 11:45:10 +00:00
parent d8f48e6a9d
commit 2b8912f790
2 changed files with 7 additions and 3 deletions

View File

@ -248,6 +248,8 @@ Session::destroy ()
_butler->drop_references ();
delete _butler;
_butler = 0;
delete midi_control_ui;
delete _all_route_group;

View File

@ -1476,9 +1476,11 @@ Session::engine_halted ()
the picture.
*/
g_atomic_int_set (&_butler->should_do_transport_work, 0);
set_post_transport_work (PostTransportWork (0));
_butler->stop ();
if (_butler) {
g_atomic_int_set (&_butler->should_do_transport_work, 0);
set_post_transport_work (PostTransportWork (0));
_butler->stop ();
}
realtime_stop (false, true);
non_realtime_stop (false, 0, ignored);