don't remove an item that isn't in the layout
svn path=/trunk/KDE/kdelibs/; revision=1100924
This commit is contained in:
parent
6842d43101
commit
bb75767105
@ -219,7 +219,7 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
|
|||||||
(f == Plasma::Vertical || f == Plasma::Horizontal))) {
|
(f == Plasma::Vertical || f == Plasma::Horizontal))) {
|
||||||
QGraphicsLinearLayout *lay = dynamic_cast<QGraphicsLinearLayout *>(q->layout());
|
QGraphicsLinearLayout *lay = dynamic_cast<QGraphicsLinearLayout *>(q->layout());
|
||||||
|
|
||||||
if (icon && !icon->icon().isNull() && lay) {
|
if (icon && !icon->icon().isNull() && lay && lay->count() > 0) {
|
||||||
lay->removeAt(0);
|
lay->removeAt(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user