13
0

properly retain LV2PluginInfo

This commit is contained in:
Robin Gareus 2014-09-11 02:28:57 +02:00
parent 6f6e78284d
commit c4a7d25b34
2 changed files with 3 additions and 2 deletions

View File

@ -23,6 +23,7 @@
#include <set>
#include <string>
#include <vector>
#include <boost/enable_shared_from_this.hpp>
#include "ardour/plugin.h"
#include "ardour/uri_map.h"
@ -272,7 +273,7 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee
};
class LIBARDOUR_API LV2PluginInfo : public PluginInfo {
class LIBARDOUR_API LV2PluginInfo : public PluginInfo , public boost::enable_shared_from_this<ARDOUR::LV2PluginInfo> {
public:
LV2PluginInfo (const char* plugin_uri);
~LV2PluginInfo ();

View File

@ -2066,7 +2066,7 @@ LV2PluginInfo::load(Session& session)
if (!lp) { throw failed_constructor(); }
plugin.reset(new LV2Plugin(session.engine(), session, lp, session.frame_rate()));
lilv_node_free(uri);
plugin->set_info(PluginInfoPtr(new LV2PluginInfo(*this)));
plugin->set_info(PluginInfoPtr(shared_from_this ()));
return plugin;
} catch (failed_constructor& err) {
return PluginPtr((Plugin*)0);