From 5927fb49976aea12591fb9d72eee77d1deeb2e6d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 26 Jan 2015 15:54:29 -0500 Subject: fix timing of Butler mapping config parameters to avoid crash. Amazing that this didn't show up on Linux at all, or on the first run after build. Computers ... sigh. Conflicts: libs/ardour/butler.cc --- libs/ardour/butler.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'libs/ardour/butler.cc') diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc index 2485bc399f..67d7dd1617 100644 --- a/libs/ardour/butler.cc +++ b/libs/ardour/butler.cc @@ -54,13 +54,8 @@ Butler::Butler(Session& s) g_atomic_int_set(&should_do_transport_work, 0); SessionEvent::pool->set_trash (&pool_trash); - /* catch future changes to parameters */ - Config->ParameterChanged.connect_same_thread (*this, boost::bind (&Butler::config_changed, this, _1)); - - /* use any current ones that we care about */ - boost::function ff (boost::bind (&Butler::config_changed, this, _1)); - Config->map_parameters (ff); - + /* catch future changes to parameters */ + Config->ParameterChanged.connect_same_thread (*this, boost::bind (&Butler::config_changed, this, _1)); } Butler::~Butler() @@ -68,6 +63,14 @@ Butler::~Butler() terminate_thread (); } +void +Butler::map_parameters () +{ + /* use any current ones that we care about */ + boost::function ff (boost::bind (&Butler::config_changed, this, _1)); + Config->map_parameters (ff); +} + void Butler::config_changed (std::string p) { -- cgit v1.2.3