File kcontrol-locale-fix.patch of Package kdebase4-runtime

diff --git a/kcontrol/locale/kcmlocale.cpp b/kcontrol/locale/kcmlocale.cpp
index cf58e4c..4a04f0d 100644
--- a/kcontrol/locale/kcmlocale.cpp
+++ b/kcontrol/locale/kcmlocale.cpp
@@ -2449,7 +2449,11 @@ void KCMLocale::setTimeFormat( const QString &newValue )
 
 QString KCMLocale::dayPeriodText( const QString &dayPeriod )
 {
-    return dayPeriod.split( QChar::fromLatin1(',') ).at( 2 );
+    QStringList split = dayPeriod.split( QChar::fromLatin1(',') );
+    if (split.size() > 2)
+       return split.at( 2 );
+    else
+       return QString::null;
 }
 
 QString KCMLocale::amPeriod( const QString &longName, const QString &shortName, const QString &narrowName )
openSUSE Build Service is sponsored by