diff options
-rw-r--r-- | src/gui/GraphBox.cpp | 4 | ||||
-rw-r--r-- | src/gui/PropertiesWindow.cpp | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index 414bbef4..9efba2ee 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -252,6 +252,10 @@ GraphBox::create(App& app, const std::shared_ptr<const GraphModel>& graph) GraphBox* result = nullptr; const Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("graph_win"); xml->get_widget_derived("graph_win_vbox", result); + if (!result) { + return {}; + } + result->init_box(app); result->set_graph(graph, nullptr); diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index b51ae37e..042718a0 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -501,10 +501,13 @@ PropertiesWindow::get_value(LV2_URID type, Gtk::Widget* value_widget) } } else if (type == forge.URI || type == forge.URID) { auto* uri_entry = dynamic_cast<URIEntry*>(value_widget); - if (uri_entry && URI::is_valid(uri_entry->get_text())) { - return _app->forge().make_urid(URI(uri_entry->get_text())); + if (uri_entry) { + if (URI::is_valid(uri_entry->get_text())) { + return _app->forge().make_urid(URI(uri_entry->get_text())); + } + + _app->log().error("Invalid URI <%1%>\n", uri_entry->get_text()); } - _app->log().error("Invalid URI <%1%>\n", uri_entry->get_text()); } else if (type == forge.String) { auto* entry = dynamic_cast<Gtk::Entry*>(value_widget); if (entry) { |