From a3be61c15b7886a4d434e6715dc58c158c976742 Mon Sep 17 00:00:00 2001 From: Anatoly Mihalchenko Date: Tue, 4 Sep 2012 13:00:35 +0300 Subject: [PATCH] Keyboard under MAX 10.7 --- src/gui/UBKeyboardPalette.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/UBKeyboardPalette.cpp b/src/gui/UBKeyboardPalette.cpp index 3f1fe242..2a496526 100644 --- a/src/gui/UBKeyboardPalette.cpp +++ b/src/gui/UBKeyboardPalette.cpp @@ -60,7 +60,10 @@ UBKeyboardPalette::UBKeyboardPalette(QWidget *parent) createCtrlButtons(); nCurrentLocale = UBSettings::settings()->KeyboardLocale->get().toInt(); - setInput(locales[nCurrentLocale]); + if (nCurrentLocale < 0 || nCurrentLocale >= nLocalesCount) + nCurrentLocale = 0; + if (locales!=NULL) + setInput(locales[nCurrentLocale]); setContentsMargins( 22, 22, 22, 22 );