Fix detection of same matrices when both matrices are not handled by extract_data.

This commit is contained in:
Gael Guennebaud
2016-04-13 18:26:08 +02:00
parent 512ba0ac76
commit 2630d97c62
3 changed files with 7 additions and 4 deletions

View File

@@ -213,7 +213,8 @@ template<int Side, typename TriangularType, typename Rhs> struct triangular_solv
template<typename Dest> inline void evalTo(Dest& dst) const
{
if(!(is_same<RhsNestedCleaned,Dest>::value && extract_data(dst) == extract_data(m_rhs)))
const typename Dest::Scalar *dst_data = internal::extract_data(dst);
if(!(is_same<RhsNestedCleaned,Dest>::value && dst_data!=0 && dst_data == extract_data(m_rhs)))
dst = m_rhs;
m_triangularMatrix.template solveInPlace<Side>(dst);
}