mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Do not dereference null pointer in KItemListViewAccessible
BUG: 316285 FIXED-IN: 4.10.3
This commit is contained in:
parent
34d0ad722e
commit
f8bf257734
1 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue