QAbstractItemView: do not access invalid model indices (2/N)
Similar to the parent patch, the private selectAll() was doing two out of bounds accesses on an empty model. Guard it. Change-Id: If0f3ce1e6c44a152791313e47db79985e71ef955 Pick-to: 5.15 6.2 6.3 Reviewed-by: David Faure <david.faure@kdab.com>bb10
parent
33ad8b6fa9
commit
035babe502
|
|
@ -4623,6 +4623,8 @@ void QAbstractItemViewPrivate::selectAll(QItemSelectionModel::SelectionFlags com
|
|||
{
|
||||
if (!selectionModel)
|
||||
return;
|
||||
if (!model->hasChildren(root))
|
||||
return;
|
||||
|
||||
QItemSelection selection;
|
||||
QModelIndex tl = model->index(0, 0, root);
|
||||
|
|
|
|||
Loading…
Reference in New Issue