diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
index 54c5f65a6dfc43a2fabedef1cbbf19fc0aefd05d..a5e659dca4dd2cb279d27d976a3be8607eed65ef 100644
--- a/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
+++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.cpp
@@ -52,10 +52,12 @@ public:
 
         auto const success = solveImpl(b, x, opt);
 
+#ifdef USE_EIGEN_UNSUPPORTED
         if (scaling_)
         {
             x = scaling_->RightScaling().cwiseProduct(x);
         }
+#endif
 
         return success;
     }