diff --git a/Eigen/src/SparseCore/CompressedStorage.h b/Eigen/src/SparseCore/CompressedStorage.h index d667944ce..2199848e9 100644 --- a/Eigen/src/SparseCore/CompressedStorage.h +++ b/Eigen/src/SparseCore/CompressedStorage.h @@ -50,9 +50,9 @@ class CompressedStorage CompressedStorage& operator=(const CompressedStorage& other) { + resize(other.size()); if(other.size()>0) { - resize(other.size()); internal::smart_copy(other.m_values, other.m_values + m_size, m_values); internal::smart_copy(other.m_indices, other.m_indices + m_size, m_indices); }