From 6db34c47dbcdcae6eef364905ff4c20e0916e1f9 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 23 Aug 2014 14:38:40 -0300 Subject: [PATCH] Fix GPUCommandList crash on startup --- src/citra_qt/debugger/graphics_cmdlists.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index e98560a19..ef1ddfba5 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp @@ -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