From: Daniel Arndt Date: Mon, 30 Apr 2018 16:35:24 +0000 (+0200) Subject: Guard accessing values in Vector::zero_out_ghosts X-Git-Tag: v9.0.0-rc1~54^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e91943c4867bec6474d4c4024d0810a3e633ac0;p=dealii.git Guard accessing values in Vector::zero_out_ghosts --- diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index c3619ddc60..fd40922872 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -517,9 +517,10 @@ namespace LinearAlgebra void Vector::zero_out_ghosts () const { - std::fill_n (&values[partitioner->local_size()], - partitioner->n_ghost_indices(), - Number()); + if (values != nullptr) + std::fill_n (&values[partitioner->local_size()], + partitioner->n_ghost_indices(), + Number()); vector_is_ghosted = false; }