From: Simon Sticko Date: Thu, 6 Feb 2020 08:32:32 +0000 (+0100) Subject: Add an assert on row index in SparseMatrix::add(..) X-Git-Tag: v9.2.0-rc1~566^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9484%2Fhead;p=dealii.git Add an assert on row index in SparseMatrix::add(..) --- diff --git a/include/deal.II/lac/sparse_matrix.templates.h b/include/deal.II/lac/sparse_matrix.templates.h index 1e81b55c16..b5e6f925ac 100644 --- a/include/deal.II/lac/sparse_matrix.templates.h +++ b/include/deal.II/lac/sparse_matrix.templates.h @@ -541,6 +541,7 @@ SparseMatrix::add(const size_type row, const bool col_indices_are_sorted) { Assert(cols != nullptr, ExcNotInitialized()); + AssertIndexRange(row, m()); // if we have sufficiently many columns // and sorted indices it is faster to