Commit f8bf2577 authored by Frank Reininghaus's avatar Frank Reininghaus

Do not dereference null pointer in KItemListViewAccessible

BUG: 316285
FIXED-IN: 4.10.3
parent 34d0ad72
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment