From ed6545eb5b360afc1a11f3dec0bb553a11e64436 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 6 Jan 2010 21:56:23 +0000 Subject: screw up MIDI control "automation" tracks quite a bit while trying to improve menu structure BUT add a MIDI tracer window and fix a crashing bug caused by regions prematurely being destroyed git-svn-id: svn://localhost/ardour2/branches/3.0@6465 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/region.cc | 15 ++++++++++----- libs/ardour/source.cc | 3 +-- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'libs/ardour') diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 57d887f6a6..09f60926c4 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -1416,12 +1416,17 @@ Region::source_deleted (boost::weak_ptr) { _sources.clear (); - /* this is a very special case: at least one of the region's - sources has bee deleted, so invalidate all references to - ourselves. - */ + if (!_session.deletion_in_progress()) { + /* this is a very special case: at least one of the region's + sources has bee deleted, so invalidate all references to + ourselves. Do NOT do this during session deletion, because + then we run the risk that this will actually result + in this object being deleted (as refcnt goes to zero) + while emitting DropReferences. + */ - drop_references (); + drop_references (); + } } vector diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc index a8c4262a66..239c3729c9 100644 --- a/libs/ardour/source.cc +++ b/libs/ardour/source.cc @@ -75,10 +75,9 @@ Source::Source (Session& s, const XMLNode& node) Source::~Source () { - DEBUG_TRACE (DEBUG::Destruction, string_compose ("Source %1 destructor\n", _name)); + DEBUG_TRACE (DEBUG::Destruction, string_compose ("Source %1 destructor %2\n", _name, this)); } - void Source::fix_writable_flags () { -- cgit v1.2.3