13
0

fix midi source factory -- load_model() uses shared_from_this()

This commit is contained in:
Robin Gareus 2014-01-22 15:30:04 +01:00
parent 3bc0d3e57b
commit eb853b79c4

View File

@ -272,18 +272,17 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path,
} else if (type == DataType::MIDI) { } 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); src->load_model (true, true);
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS #ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
// boost_debug_shared_ptr_mark_interesting (src, "Source"); // boost_debug_shared_ptr_mark_interesting (src, "Source");
#endif #endif
boost::shared_ptr<Source> ret (src);
if (announce) { if (announce) {
SourceCreated (ret); SourceCreated (src);
} }
return ret; return src;
} }