summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kxkb/kxkb.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/kxkb/kxkb.cpp b/kxkb/kxkb.cpp
index 4bc5bdbd7..8d725e3e5 100644
--- a/kxkb/kxkb.cpp
+++ b/kxkb/kxkb.cpp
@@ -274,7 +274,12 @@ void KXKBApp::menuActivated(int id)
// }
}
-void KXKBApp::slotGroupChanged(uint group) {
+void KXKBApp::slotGroupChanged(uint group)
+{
+ if (group >= kxkbConfig.m_layouts.count())
+ {
+ group = 0;
+ }
m_currentLayout = kxkbConfig.m_layouts[group];
m_tray->setCurrentLayout(m_currentLayout);
}
@@ -341,4 +346,4 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
app.disableSessionManagement();
app.exec();
return 0;
-} \ No newline at end of file
+}