diff options
author | Doug McLain <doug@nostar.net> | 2007-12-13 03:59:21 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2007-12-13 03:59:21 +0000 |
commit | 363add23aff44667c9894b701221ac00fdcd4ad2 (patch) | |
tree | 9fbe9e549fdd8b68528859a32be360d14a20b00d /gtk2_ardour/plugin_ui.cc | |
parent | a0c61cdd1737e1a2a81fe4756899768986a47bc8 (diff) |
vst fixes
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2781 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/plugin_ui.cc')
-rw-r--r-- | gtk2_ardour/plugin_ui.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index e9aa86bafe..64e41bedb9 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -134,11 +134,20 @@ PluginUIWindow::create_vst_editor(boost::shared_ptr<PluginInsert> insert) #ifndef VST_SUPPORT return false; #else - VSTPluginUI* vpu = new VSTPluginUI (insert, vp); + + boost::shared_ptr<VSTPlugin> vp; + + if ((vp = boost::dynamic_pointer_cast<VSTPlugin> (insert->plugin())) == 0) { + error << _("unknown type of editor-supplying plugin (note: no VST support in this version of ardour)") + << endmsg; + throw failed_constructor (); + } else { + VSTPluginUI* vpu = new VSTPluginUI (insert, vp); - _pluginui = vpu; - get_vbox()->add (*vpu); - vpu->package (*this); + _pluginui = vpu; + get_vbox()->add (*vpu); + vpu->package (*this); + } non_gtk_gui = true; return true; |