Gracefully handle LV2 UIs that fail to return a widget.
git-svn-id: svn://localhost/ardour2/branches/3.0@12416 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
72bccc40e7
commit
17406258ae
@ -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 <lilv/lilv.h>
|
||||
#include <suil/suil.h>
|
||||
|
||||
#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);
|
||||
|
Loading…
Reference in New Issue
Block a user