Fix GPUCommandList crash on startup
This commit is contained in:
@@ -24,7 +24,11 @@ QModelIndex GPUCommandListModel::index(int row, int column, const QModelIndex& p
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user