From: Wolfgang Bangerth Date: Thu, 22 Oct 2009 20:26:31 +0000 (+0000) Subject: Fix a bug: for a boost::scoped_ptr, the test X-Git-Tag: v8.0.0~6875 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcf535c834673784105de54093e4764f0d4f3360;p=dealii.git Fix a bug: for a boost::scoped_ptr, the test &*ptr != 0 fails if ptr==0 because boost trips on an assertion if we call operator* on a pointer that's zero. git-svn-id: https://svn.dealii.org/trunk@19988 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/constraint_matrix.cc b/deal.II/lac/source/constraint_matrix.cc index 6e87a8cca5..c15362443e 100644 --- a/deal.II/lac/source/constraint_matrix.cc +++ b/deal.II/lac/source/constraint_matrix.cc @@ -1879,7 +1879,7 @@ ConstraintMatrix::distribute (TrilinosWrappers::MPI::Vector &vec) const // constraints indicate. Do this only at // the first call and provide the class // with a vector for further use. - if (&*vec_distribute!=0 || vec_distribute->size()!=vec.size()) + if (!vec_distribute || vec_distribute->size()!=vec.size()) { std::vector my_indices(vec.local_size()); unsigned int index2 = 0;