summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-14 11:45:10 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-14 11:45:10 +0000
commit2b8912f7901ff00aadc20e01371b4b8a53971967 (patch)
treeabae2119e5ead89b4c9e6912fd4c4c839b8ba238 /libs
parentd8f48e6a9d5a2b38604ee8292b5fc8b9340f9efa (diff)
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
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session.cc2
-rw-r--r--libs/ardour/session_transport.cc8
2 files changed, 7 insertions, 3 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 9e46f38f6a..9f8d0808af 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -248,6 +248,8 @@ Session::destroy ()
_butler->drop_references ();
delete _butler;
+ _butler = 0;
+
delete midi_control_ui;
delete _all_route_group;
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 5fef402d9f..7c23e2aee7 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -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);