From e0d42cbe9c3f7cb4c90303805ef06e6ed245af90 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 28 Nov 2020 17:33:15 -0600 Subject: [PATCH] Fix index out of bounds when an app is hidden --- app/gui/appmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/gui/appmodel.cpp b/app/gui/appmodel.cpp index 67630773..dfd0cfda 100644 --- a/app/gui/appmodel.cpp +++ b/app/gui/appmodel.cpp @@ -49,7 +49,7 @@ Session* AppModel::createSessionForApp(int appIndex) int AppModel::getDirectLaunchAppIndex() { - for (int i = 0; i < m_AllApps.count(); i++) { + for (int i = 0; i < m_VisibleApps.count(); i++) { if (m_VisibleApps[i].directLaunch) { return i; }