prevent assert if d->applets is empty and we compiled with debug enabled.

BUG:162742

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816502
This commit is contained in:
Sebastian Sauer 2008-06-04 02:44:54 +00:00
parent 834003d0dc
commit cc80b06826

View File

@ -766,8 +766,8 @@ void Containment::keyPressEvent(QKeyEvent *event)
{
kDebug() << "keyPressEvent with" << event->key() << "and hoping and wishing for a" << Qt::Key_Tab;
if (event->key() == Qt::Key_Tab) { // && event->modifiers() == 0) {
kDebug() << "let's give focus to...." << (QObject*)d->applets.first();
if (!d->applets.isEmpty()) {
kDebug() << "let's give focus to...." << (QObject*)d->applets.first();
d->applets.first()->setFocus(Qt::TabFocusReason);
}
}