From 5cdb2ccf672e2fa6774c06fd06968f98da0d7016 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 14 Nov 2016 07:10:43 -0700 Subject: [PATCH] Initialize the 'matrix' and 'vector' members in the PETSc wrappers. These members are of type 'Mat' and 'Vec', which are typedefed to pointers to otherwise opaque types. Initialize these members to 'NULL'. --- source/lac/petsc_matrix_base.cc | 3 ++- source/lac/petsc_vector_base.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/lac/petsc_matrix_base.cc b/source/lac/petsc_matrix_base.cc index 350cd54842..294a6ac4fd 100644 --- a/source/lac/petsc_matrix_base.cc +++ b/source/lac/petsc_matrix_base.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2015 by the deal.II authors +// Copyright (C) 2004 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -76,6 +76,7 @@ namespace PETScWrappers MatrixBase::MatrixBase () : + matrix (NULL), last_action (VectorOperation::unknown) {} diff --git a/source/lac/petsc_vector_base.cc b/source/lac/petsc_vector_base.cc index febffa9c45..185f789388 100644 --- a/source/lac/petsc_vector_base.cc +++ b/source/lac/petsc_vector_base.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2004 - 2015 by the deal.II authors +// Copyright (C) 2004 - 2016 by the deal.II authors // // This file is part of the deal.II library. // @@ -150,6 +150,7 @@ namespace PETScWrappers VectorBase::VectorBase () : + vector (NULL), ghosted(false), last_action (::dealii::VectorOperation::unknown), attained_ownership(true) -- 2.39.5