diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-02-18 11:26:25 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-02-18 11:26:25 +0100 |
commit | dc7e6acc05f6d546db401545582bdd13c0331596 (patch) | |
tree | 87502aeb8659622ff7eed2a8e3eea75fea255d4e /Eigen/src/CholmodSupport | |
parent | d4eda014889541e3a22680bf236bf814a6fbc813 (diff) |
Fix possible usage of a null pointer in CholmodSupport
Diffstat (limited to 'Eigen/src/CholmodSupport')
-rw-r--r-- | Eigen/src/CholmodSupport/CholmodSupport.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Eigen/src/CholmodSupport/CholmodSupport.h b/Eigen/src/CholmodSupport/CholmodSupport.h index 8ef0fb3b5..d2b0fb282 100644 --- a/Eigen/src/CholmodSupport/CholmodSupport.h +++ b/Eigen/src/CholmodSupport/CholmodSupport.h @@ -277,6 +277,7 @@ class CholmodBase : public SparseSolverBase<Derived> if(!x_cd) { this->m_info = NumericalIssue; + return; } // TODO optimize this copy by swapping when possible (be careful with alignment, etc.) dest = Matrix<Scalar,Dest::RowsAtCompileTime,Dest::ColsAtCompileTime>::Map(reinterpret_cast<Scalar*>(x_cd->x),b.rows(),b.cols()); @@ -298,6 +299,7 @@ class CholmodBase : public SparseSolverBase<Derived> if(!x_cs) { this->m_info = NumericalIssue; + return; } // TODO optimize this copy by swapping when possible (be careful with alignment, etc.) dest = viewAsEigen<DestScalar,DestOptions,DestIndex>(*x_cs); |