From a836446d223462378767ed39730149ceb3f33624 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Sun, 19 Apr 2015 21:07:45 +1000 Subject: [PATCH] Fix assert() triggering due to bad index being passed. --- apps/opencs/view/world/dialoguesubview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/opencs/view/world/dialoguesubview.cpp b/apps/opencs/view/world/dialoguesubview.cpp index 2e800b56f..f067c3225 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -447,7 +447,7 @@ void CSVWorld::EditWidget::remake(int row) //table->resizeColumnsToContents(); table->setEditTriggers(QAbstractItemView::SelectedClicked | QAbstractItemView::CurrentChanged); - int rows = mNestedModels.back()->rowCount(mTable->index(row, i)); + int rows = mTable->rowCount(mTable->index(row, i)); int rowHeight = (rows == 0) ? table->horizontalHeader()->height() : table->rowHeight(0); int tableMaxHeight = (5 * rowHeight) + table->horizontalHeader()->height() + 2 * table->frameWidth();