From: Soeren Apel Date: Sun, 4 Dec 2016 13:38:32 +0000 (+0100) Subject: MainWindow: Fix "main_window may be uninitialized" error X-Git-Tag: pulseview-0.4.0~216 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8d466c03419819b02bbbcd591ff6c2847f507d6f;p=pulseview.git MainWindow: Fix "main_window may be uninitialized" error --- diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index a4708962..7fe09fb7 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -161,7 +161,7 @@ shared_ptr MainWindow::get_active_view() const shared_ptr MainWindow::add_view(const QString &title, views::ViewType type, Session &session) { - QMainWindow *main_window; + QMainWindow *main_window = nullptr; for (auto entry : session_windows_) if (entry.first.get() == &session) main_window = entry.second;