From cc80b068263e4ce99e04cc990fb0ddc87063e1d3 Mon Sep 17 00:00:00 2001 From: Sebastian Sauer Date: Wed, 4 Jun 2008 02:44:54 +0000 Subject: [PATCH] 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 --- containment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containment.cpp b/containment.cpp index 659679e5f..59f522d77 100644 --- a/containment.cpp +++ b/containment.cpp @@ -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); } }