From a67eea05c167e69f5e82410941d8645764e45038 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 3 Oct 2012 21:58:14 +0200 Subject: fix comma initializer when inserting empty matrices --- Eigen/src/Core/CommaInitializer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Eigen/src/Core/CommaInitializer.h') diff --git a/Eigen/src/Core/CommaInitializer.h b/Eigen/src/Core/CommaInitializer.h index 4adce6414..f20c1774c 100644 --- a/Eigen/src/Core/CommaInitializer.h +++ b/Eigen/src/Core/CommaInitializer.h @@ -65,6 +65,8 @@ struct CommaInitializer template CommaInitializer& operator,(const DenseBase& other) { + if(other.cols()==0 || other.rows()==0) + return *this; if (m_col==m_xpr.cols()) { m_row+=m_currentBlockRows; -- cgit v1.2.3