diff options
author | Carl Hetherington <carl@carlh.net> | 2010-02-03 00:52:45 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-02-03 00:52:45 +0000 |
commit | c3bfc3ec4e14d147d9c4c279eb6c73947781f956 (patch) | |
tree | 250b7e09a3552419249c317eec5258d08fe801ba /libs/ardour | |
parent | faa2b3a3ad9217b0bde341f50a398515aefd703a (diff) |
Stop crash on deleting a plugin when its generic UI window is open.
git-svn-id: svn://localhost/ardour2/branches/3.0@6626 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/plugin_insert.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 518473a8c9..9858362566 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -432,11 +432,12 @@ PluginInsert::set_parameter (Evoral::Parameter param, float val) float PluginInsert::get_parameter (Evoral::Parameter param) { - if (param.type() != PluginAutomation) + if (param.type() != PluginAutomation) { return 0.0; - else - return - _plugins[0]->get_parameter (param.id()); + } else { + assert (!_plugins.empty ()); + return _plugins[0]->get_parameter (param.id()); + } } void |