mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 10:06:33 +01:00
Handle Lua DSP script load failure (unknown plugin)
This handles a very specific edge-case: A script that was successfully parsed before, fails load on session state restore.
This commit is contained in:
parent
7852047dca
commit
a5140f4558
3 changed files with 7 additions and 3 deletions
|
|
@ -199,6 +199,9 @@ LuaProc::lua_print (std::string s) {
|
|||
bool
|
||||
LuaProc::load_script ()
|
||||
{
|
||||
if (_script.empty ()) {
|
||||
return true;
|
||||
}
|
||||
assert (!_lua_dsp); // don't allow to re-initialize
|
||||
LuaPluginInfoPtr lpi;
|
||||
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ ARDOUR::find_plugin(Session& session, string identifier, PluginType type)
|
|||
}
|
||||
#endif
|
||||
|
||||
return PluginPtr ((Plugin*) 0);
|
||||
return PluginPtr ();
|
||||
}
|
||||
|
||||
ChanCount
|
||||
|
|
|
|||
|
|
@ -2656,8 +2656,9 @@ PluginInsert::set_state(const XMLNode& node, int version)
|
|||
boost::shared_ptr<LuaProc> lp (new LuaProc (_session.engine(), _session, ""));
|
||||
XMLNode *ls = node.child (lp->state_node_name().c_str());
|
||||
if (ls && lp) {
|
||||
lp->set_script_from_state (*ls);
|
||||
plugin = lp;
|
||||
if (0 == lp->set_script_from_state (*ls)) {
|
||||
plugin = lp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue