From dc7e6acc05f6d546db401545582bdd13c0331596 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 18 Feb 2015 11:26:25 +0100 Subject: [PATCH] Fix possible usage of a null pointer in CholmodSupport --- Eigen/src/CholmodSupport/CholmodSupport.h | 2 ++ 1 file changed, 2 insertions(+) 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 if(!x_cd) { this->m_info = NumericalIssue; + return; } // TODO optimize this copy by swapping when possible (be careful with alignment, etc.) dest = Matrix::Map(reinterpret_cast(x_cd->x),b.rows(),b.cols()); @@ -298,6 +299,7 @@ class CholmodBase : public SparseSolverBase if(!x_cs) { this->m_info = NumericalIssue; + return; } // TODO optimize this copy by swapping when possible (be careful with alignment, etc.) dest = viewAsEigen(*x_cs);