summaryrefslogtreecommitdiffstats
path: root/src/gui/NodeModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/NodeModule.cpp')
-rw-r--r--src/gui/NodeModule.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index ae9a997d..4e149bbf 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -235,14 +235,18 @@ NodeModule::embed_gui(bool embed)
_plugin_ui->signal_property_changed().connect(
sigc::mem_fun(app(), &App::set_property));
- GtkWidget* c_widget = (GtkWidget*)_plugin_ui->get_widget();
- _gui_widget = Glib::wrap(c_widget);
-
- Gtk::Container* container = new Gtk::EventBox();
- container->set_name("IngenEmbeddedUI");
- container->set_border_width(4.0);
- container->add(*_gui_widget);
- Ganv::Module::embed(container);
+ if (!_plugin_ui->instantiate()) {
+ app().log().error("Failed to instantiate LV2 UI\n");
+ } else {
+ GtkWidget* c_widget = (GtkWidget*)_plugin_ui->get_widget();
+ _gui_widget = Glib::wrap(c_widget);
+
+ Gtk::Container* container = new Gtk::EventBox();
+ container->set_name("IngenEmbeddedUI");
+ container->set_border_width(4.0);
+ container->add(*_gui_widget);
+ Ganv::Module::embed(container);
+ }
} else {
app().log().error("Failed to create LV2 UI\n");
}