Do not dereference null pointer in KItemListViewAccessible

BUG: 316285
FIXED-IN: 4.10.3
This commit is contained in:
Frank Reininghaus 2013-04-23 19:25:52 +02:00
parent 34d0ad722e
commit f8bf257734

View file

@ -242,9 +242,15 @@ QRect KItemListViewAccessible::rect(int child) const
if (!view()->isVisible()) {
return QRect();
}
const QPoint origin = view()->scene()->views()[0]->mapToGlobal(QPoint(0, 0));
const QRect viewRect = view()->geometry().toRect();
return viewRect.translated(origin);
const QGraphicsScene* scene = view()->scene();
if (scene) {
const QPoint origin = scene->views()[0]->mapToGlobal(QPoint(0, 0));
const QRect viewRect = view()->geometry().toRect();
return viewRect.translated(origin);
} else {
return QRect();
}
}
int KItemListViewAccessible::navigate(RelationFlag relation, int index, QAccessibleInterface** interface) const