prevent possible crash

svn path=/trunk/KDE/kdelibs/; revision=894455
This commit is contained in:
Aaron J. Seigo 2008-12-08 17:32:57 +00:00
parent 2d6431cafa
commit dffbf7817c

View File

@ -300,6 +300,10 @@ void Extender::itemHoverLeaveEvent(ExtenderItem *item)
FrameSvg::EnabledBorders Extender::enabledBordersForItem(ExtenderItem *item) const
{
if (d->layout->count() < 1) {
return 0;
}
ExtenderItem *topItem = dynamic_cast<ExtenderItem*>(d->layout->itemAt(0));
ExtenderItem *bottomItem = dynamic_cast<ExtenderItem*>(d->layout->itemAt(d->layout->count() - 1));
if (d->appearance == TopDownStacked && bottomItem != item) {