diff options
author | David Robillard <d@drobilla.net> | 2020-08-01 16:01:35 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-02 01:48:48 +0200 |
commit | 0aea3dae1101e6f21f4ab51fd3301d2786b7f5c4 (patch) | |
tree | 3e05a6b3b36dfe25fc20a42840f3071bf4c2d23c /src/gui/GraphView.cpp | |
parent | 97dc2836a62625656a2af0e8def015ea0c322046 (diff) | |
download | ingen-0aea3dae1101e6f21f4ab51fd3301d2786b7f5c4.tar.gz ingen-0aea3dae1101e6f21f4ab51fd3301d2786b7f5c4.tar.bz2 ingen-0aea3dae1101e6f21f4ab51fd3301d2786b7f5c4.zip |
Fix uninitialized variables
Diffstat (limited to 'src/gui/GraphView.cpp')
-rw-r--r-- | src/gui/GraphView.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/GraphView.cpp b/src/gui/GraphView.cpp index a4bc1400..4f76f798 100644 --- a/src/gui/GraphView.cpp +++ b/src/gui/GraphView.cpp @@ -100,9 +100,14 @@ GraphView::set_graph(const SPtr<const GraphModel>& graph) SPtr<GraphView> GraphView::create(App& app, const SPtr<const GraphModel>& graph) { - GraphView* result = nullptr; - Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("warehouse_win"); + GraphView* result = nullptr; + Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("warehouse_win"); + xml->get_widget_derived("graph_view_box", result); + if (!result) { + return nullptr; + } + result->init(app); result->set_graph(graph); return SPtr<GraphView>(result); |