mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-15 10:48:33 +01:00
Fixes issue #3 \o/
A reminder for next time: enable various "Universal Access" options.
This commit is contained in:
parent
84bede61d3
commit
fd2daf6fa2
@ -64,7 +64,7 @@ int SimpleTreeModel<T>::columnCount(const QModelIndex &) const {
|
||||
template <typename T>
|
||||
QModelIndex SimpleTreeModel<T>::index(int row, int, const QModelIndex& parent) const {
|
||||
T* parent_item = IndexToItem(parent);
|
||||
if (!parent_item || parent_item->children.count() <= row)
|
||||
if (!parent_item || row < 0 || parent_item->children.count() <= row)
|
||||
return QModelIndex();
|
||||
|
||||
return ItemToIndex(parent_item->children[row]);
|
||||
|
Loading…
Reference in New Issue
Block a user