From 1f1abd06466ee8391272c71fd6e185482dec1765 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 26 Sep 2011 21:03:11 +0000 Subject: [PATCH] Correct signal handling for previous commit. git-svn-id: svn://localhost/ardour2/branches/3.0@10130 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/midi++2/manager.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/libs/midi++2/manager.cc b/libs/midi++2/manager.cc index b411a1ddad..03e418e4b2 100644 --- a/libs/midi++2/manager.cc +++ b/libs/midi++2/manager.cc @@ -67,9 +67,11 @@ Manager::~Manager () Port * Manager::add_port (Port* p) { - RCUWriter writer (_ports); - boost::shared_ptr pw = writer.get_copy (); - pw->push_back (p); + { + RCUWriter writer (_ports); + boost::shared_ptr pw = writer.get_copy (); + pw->push_back (p); + } PortsChanged (); /* EMIT SIGNAL */ @@ -79,9 +81,11 @@ Manager::add_port (Port* p) void Manager::remove_port (Port* p) { - RCUWriter writer (_ports); - boost::shared_ptr pw = writer.get_copy (); - pw->remove (p); + { + RCUWriter writer (_ports); + boost::shared_ptr pw = writer.get_copy (); + pw->remove (p); + } PortsChanged (); /* EMIT SIGNAL */ }