summaryrefslogtreecommitdiff
path: root/modules/controlcenter/Session.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/controlcenter/Session.qml')
-rw-r--r--modules/controlcenter/Session.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/controlcenter/Session.qml b/modules/controlcenter/Session.qml
index 0408a1a..5c4bb05 100644
--- a/modules/controlcenter/Session.qml
+++ b/modules/controlcenter/Session.qml
@@ -16,6 +16,6 @@ QtObject {
readonly property EthernetState ethernet: EthernetState {}
readonly property LauncherState launcher: LauncherState {}
- onActiveChanged: activeIndex = panes.indexOf(active)
- onActiveIndexChanged: active = panes[activeIndex]
+ onActiveChanged: activeIndex = Math.max(0, panes.indexOf(active))
+ onActiveIndexChanged: if (panes[activeIndex]) active = panes[activeIndex]
}