From 570eef4cdd33ed22d48d26e3f304e686f542f8ae Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 18 Mar 2008 21:47:30 +0000 Subject: [PATCH] Don't access past-the-end iterators. git-svn-id: https://svn.dealii.org/trunk@15909 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/dofs/dof_constraints.templates.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deal.II/deal.II/include/dofs/dof_constraints.templates.h b/deal.II/deal.II/include/dofs/dof_constraints.templates.h index c264bbc178..3a89ede482 100644 --- a/deal.II/deal.II/include/dofs/dof_constraints.templates.h +++ b/deal.II/deal.II/include/dofs/dof_constraints.templates.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -619,7 +619,9 @@ distribute_local_to_global (const Vector &local_vector, // the nodes to which it is // constrained are also // fixed - if (position->line != local_dof_indices[i]) + if ((position == lines.end()) + || + (position->line != local_dof_indices[i])) global_vector(local_dof_indices[i]) += local_vector(i); else { -- 2.39.5