bugfix when the diagonal is not stored and assumed to be 1
diff --git a/Eigen/src/Sparse/TriangularSolver.h b/Eigen/src/Sparse/TriangularSolver.h
index 168439b..30ddd1a 100644
--- a/Eigen/src/Sparse/TriangularSolver.h
+++ b/Eigen/src/Sparse/TriangularSolver.h
@@ -79,7 +79,7 @@
       {
         Scalar tmp = other.coeff(i,col);
         typename Lhs::InnerIterator it(lhs, i);
-        if (it.index() == i)
+        if (it && it.index() == i)
           ++it;
         for(; it; ++it)
         {
@@ -91,7 +91,7 @@
         else
         {
           typename Lhs::InnerIterator it(lhs, i);
-          ei_assert(it.index() == i);
+          ei_assert(it && it.index() == i);
           other.coeffRef(i,col) = tmp/it.value();
         }
       }
@@ -119,7 +119,7 @@
             ei_assert(it.index()==i);
             tmp /= it.value();
           }
-          if (it.index()==i)
+          if (it && it.index()==i)
             ++it;
           for(; it; ++it)
             other.coeffRef(it.index(), col) -= tmp * it.value();