From 0aea3dae1101e6f21f4ab51fd3301d2786b7f5c4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 1 Aug 2020 16:01:35 +0200 Subject: Fix uninitialized variables --- src/gui/GraphView.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gui/GraphView.cpp') 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& graph) SPtr GraphView::create(App& app, const SPtr& graph) { - GraphView* result = nullptr; - Glib::RefPtr xml = WidgetFactory::create("warehouse_win"); + GraphView* result = nullptr; + Glib::RefPtr 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(result); -- cgit v1.2.1