projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bc0d3e
)
fix midi source factory -- load_model() uses shared_from_this()
author
Robin Gareus
<robin@gareus.org>
Wed, 22 Jan 2014 14:30:04 +0000
(15:30 +0100)
committer
Robin Gareus
<robin@gareus.org>
Wed, 22 Jan 2014 14:30:04 +0000
(15:30 +0100)
libs/ardour/source_factory.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/source_factory.cc
b/libs/ardour/source_factory.cc
index 5e1a7d40d90507bf13cf57ffeaea36ea87412677..0729f21592040c615edc9bf9154247cc59404f6c 100644
(file)
--- 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
;
}