From eec334c604d3fbd0ab7fcb0d9380f87c943afc90 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 5 Jul 2009 10:48:57 +0200 Subject: fixes a segfault --- Eigen/src/Sparse/SparseMatrix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src') diff --git a/Eigen/src/Sparse/SparseMatrix.h b/Eigen/src/Sparse/SparseMatrix.h index 03bc60bb5..b751b5cb9 100644 --- a/Eigen/src/Sparse/SparseMatrix.h +++ b/Eigen/src/Sparse/SparseMatrix.h @@ -371,7 +371,7 @@ class SparseMatrix const int outerSize = IsRowMajor ? rows : cols; m_innerSize = IsRowMajor ? cols : rows; m_data.clear(); - if (m_outerSize != outerSize) + if (m_outerSize != outerSize || m_outerSize==0) { delete[] m_outerIndex; m_outerIndex = new int [outerSize+1]; -- cgit v1.2.3