mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix crash on construction of SparseMatrix with zero-length diagonal
libeigen/eigen!2249
This commit is contained in:
committed by
Charles Schlosser
parent
265496e862
commit
d8c8ee6fb2
@@ -871,6 +871,10 @@ void sparse_basic(const SparseMatrixType& ref) {
|
||||
m2 -= d.asDiagonal();
|
||||
refMat2 -= d.asDiagonal();
|
||||
VERIFY_IS_APPROX(m2, refMat2);
|
||||
|
||||
// zero-length diagonal
|
||||
d = DenseVector(0);
|
||||
SparseMatrixType m4(d.asDiagonal());
|
||||
}
|
||||
|
||||
// test conservative resize
|
||||
|
||||
Reference in New Issue
Block a user