diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index ec1f1323d5..ab3fe1b39d 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -21,6 +21,7 @@ #include "ardour/plugin_manager.h" #include "ardour/processor.h" #include "ardour/session.h" +#include "pbd/error.h" #include "ardour_ui.h" #include "gui_thread.h" @@ -31,6 +32,8 @@ #include #include +#include "i18n.h" + using namespace ARDOUR; using namespace Gtk; using namespace PBD; @@ -272,6 +275,12 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title) pack_start(*_ardour_buttons_box, false, false); GtkWidget* c_widget = (GtkWidget*)GET_WIDGET(_inst); + if (!c_widget) { + error << _("failed to get LV2 UI widget") << endmsg; + suil_instance_free((SuilInstance*)_inst); + _inst = NULL; + return; + } _gui_widget = Gtk::manage(Glib::wrap(c_widget)); _gui_widget->show_all(); pack_start(*_gui_widget, true, true);