summaryrefslogtreecommitdiff
path: root/libs/ardour/source_factory.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-01-22 15:30:04 +0100
committerRobin Gareus <robin@gareus.org>2014-01-22 15:30:04 +0100
commiteb853b79c448a29ce7954fba0eb58c4c7608e034 (patch)
treea80697b2b28f56cbc5a1edbb81ac5b7b33913a12 /libs/ardour/source_factory.cc
parent3bc0d3e57ba8740b152c7fd734609c1243effcf0 (diff)
fix midi source factory -- load_model() uses shared_from_this()
Diffstat (limited to 'libs/ardour/source_factory.cc')
-rw-r--r--libs/ardour/source_factory.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index 5e1a7d40d9..0729f21592 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -272,18 +272,17 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path,
} else if (type == DataType::MIDI) {
- SMFSource* src = new SMFSource (s, path, SMFSource::Flag(0));
+ boost::shared_ptr<SMFSource> src (new SMFSource (s, path, SMFSource::Flag(0)));
src->load_model (true, true);
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
// boost_debug_shared_ptr_mark_interesting (src, "Source");
#endif
- boost::shared_ptr<Source> ret (src);
if (announce) {
- SourceCreated (ret);
+ SourceCreated (src);
}
- return ret;
+ return src;
}