Added extra check

release/4.3a0
Richard Roberts 2012-03-19 16:24:54 +00:00
parent 8a4476f63d
commit 13bbaaa2f4
1 changed files with 3 additions and 0 deletions

View File

@ -168,6 +168,9 @@ VectorValues& VectorValues::operator=(const Permuted<VectorValues>& rhs) {
if(l.rows() != r.rows())
throw std::invalid_argument("VectorValues assignment from Permuted<VectorValues> requires pre-allocation, see documentation.");
l = r;
} else {
if(rhs.container().exists(rhs.permutation()[j]))
throw std::invalid_argument("VectorValues assignment from Permuted<VectorValues> requires pre-allocation, see documentation.");
}
}
return *this;