diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
index b12e3678aa60eeb8bc527b14a502fc90330c4399..9f3829d8dcd8ce37d603591d62d92b2a15b74139 100644
--- a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
+++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
@@ -101,7 +101,7 @@ public:
              EigenOption::getSolverName(opt.solver_type));
 
         x = solver_.solve(b);
-        if (solver_.info() != Eigen::Success)
+        if (solver_.info() != Eigen::Success || x.hasNaN())
         {
             ERR("Failed during Eigen linear solve");
             return false;