From: David Wells Date: Tue, 3 Jan 2017 17:43:45 +0000 (-0500) Subject: Get rid of a null pointer dereference. X-Git-Tag: v8.5.0-rc1~291^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6937e7536b60bb295575cd5e9fe5ea0361804f6;p=dealii.git Get rid of a null pointer dereference. This was caught by cppcheck. --- diff --git a/include/deal.II/lac/iterative_inverse.h b/include/deal.II/lac/iterative_inverse.h index 8ca447fb97..e0d9dc2250 100644 --- a/include/deal.II/lac/iterative_inverse.h +++ b/include/deal.II/lac/iterative_inverse.h @@ -129,10 +129,9 @@ inline void IterativeInverse::initialize(const MatrixType &m, const PreconditionerType &p) { - // dummy variable - VectorType *v = 0; - matrix = std_cxx11::shared_ptr > (new_pointer_matrix_base(m, *v)); - preconditioner = std_cxx11::shared_ptr > (new_pointer_matrix_base(p, *v)); + VectorType v; + matrix = std_cxx11::shared_ptr > (new_pointer_matrix_base(m, v)); + preconditioner = std_cxx11::shared_ptr > (new_pointer_matrix_base(p, v)); }