small fix for a crash

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874249
This commit is contained in:
Beat Wolf 2008-10-21 01:59:22 +00:00
parent fae76869af
commit 3e7ff8ac3d

View File

@ -109,7 +109,7 @@ QPoint popupPosition(const QGraphicsItem *item, const QSize &s)
//are we out of screen?
QRect screenRect =
QApplication::desktop()->screenGeometry(pv ? pv->containment()->screen() : -1);
QApplication::desktop()->screenGeometry((pv && pv->containment()) ? pv->containment()->screen() : -1);
//kDebug() << "==> rect for" << (pv ? pv->containment()->screen() : -1) << "is" << screenRect;
if (pos.rx() + s.width() > screenRect.right()) {