diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 6a1f949258..c457f16a2c 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -1802,9 +1802,8 @@ void QHeaderViewPrivate::_q_sectionsRemoved(const QModelIndex &parent, if (logicalFirst == logicalLast) { // Remove just one index. int l = logicalFirst; int visual = visualIndices.at(l); + Q_ASSERT(sectionCount == logicalIndices.count()); for (int v = 0; v < sectionCount; ++v) { - if (v >= logicalIndices.count()) - continue; // the section doesn't exist if (v > visual) { int logical = logicalIndices.at(v); --(visualIndices[logical]); |