diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 5ae21a253..fdac4431a 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -601,7 +601,7 @@ class SparseMatrix return; m_outerIndex = internal::conditional_aligned_realloc_new_auto( - m_outerSize + outerChange + 1, m_outerSize + 1); + m_outerIndex, m_outerSize + outerChange + 1, m_outerSize + 1); if (outerChange > 0) { StorageIndex lastIdx = m_outerSize == 0 ? 0 : m_outerIndex[m_outerSize];