From f29ca068d4e6bbd5cc87c8f1ca1944a9ce21f97e Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Wed, 25 Jul 2018 10:12:49 -0400 Subject: [PATCH] move container usage after nullptr check --- src/ViewManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index 923b287a..15c34cfb 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -900,13 +900,13 @@ void ViewManager::saveSessions(KConfigGroup &group) int tab = 1; TabbedViewContainer *container = _viewSplitter->activeContainer(); - ids.reserve(container->count()); // first: sessions in the active container, preserving the order Q_ASSERT(container); if (container == nullptr) { return; } + ids.reserve(container->count()); TerminalDisplay *activeview = qobject_cast(container->currentWidget()); for (int i = 0, end = container->count(); i < end; i++) {