Fix GPUCommandList crash on startup
This commit is contained in:
parent
0ffc966e42
commit
6db34c47db
1 changed files with 5 additions and 1 deletions
|
@ -24,7 +24,11 @@ QModelIndex GPUCommandListModel::index(int row, int column, const QModelIndex& p
|
||||||
item = (TreeItem*)parent.internalPointer();
|
item = (TreeItem*)parent.internalPointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
return createIndex(row, column, item->children[row]);
|
if (row < item->children.size()) {
|
||||||
|
return createIndex(row, column, item->children[row]);
|
||||||
|
} else {
|
||||||
|
return QModelIndex();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex GPUCommandListModel::parent(const QModelIndex& child) const
|
QModelIndex GPUCommandListModel::parent(const QModelIndex& child) const
|
||||||
|
|
Loading…
Reference in a new issue