Check that row and column are not less than 0 in indexFromLogical
Change-Id: Icf6dbb234513de12c772618a046461b8674b01ce Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
57fac2e83a
commit
dc57295a7b
@ -407,7 +407,7 @@ QModelIndex QAccessibleTree::indexFromLogical(int row, int column) const
|
||||
return QModelIndex();
|
||||
|
||||
const QTreeView *treeView = qobject_cast<const QTreeView*>(view());
|
||||
if (treeView->d_func()->viewItems.count() <= row) {
|
||||
if ((row < 0) || (column < 0) || (treeView->d_func()->viewItems.count() <= row)) {
|
||||
qWarning() << "QAccessibleTree::indexFromLogical: invalid index: " << row << column << " for " << treeView;
|
||||
return QModelIndex();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user