diff --git a/popupapplet.cpp b/popupapplet.cpp index cf417f4c7..016642a43 100644 --- a/popupapplet.cpp +++ b/popupapplet.cpp @@ -219,7 +219,7 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints) (f == Plasma::Vertical || f == Plasma::Horizontal))) { QGraphicsLinearLayout *lay = dynamic_cast(q->layout()); - if (icon && !icon->icon().isNull() && lay) { + if (icon && !icon->icon().isNull() && lay && lay->count() > 0) { lay->removeAt(0); }