Accessibility: Ignore negative child indices in main window
Change-Id: I6b3d0b066bf20a09b43d6d80255fb8d428d38df1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
parent
93aa83e074
commit
9c47a273ff
@ -1127,7 +1127,7 @@ QAccessibleMainWindow::QAccessibleMainWindow(QWidget *widget)
|
||||
QAccessibleInterface *QAccessibleMainWindow::child(int index) const
|
||||
{
|
||||
QList<QWidget*> kids = childWidgets(mainWindow(), true);
|
||||
if (index < kids.count()) {
|
||||
if (index >= 0 && index < kids.count()) {
|
||||
return QAccessible::queryAccessibleInterface(kids.at(index));
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user