From: Wolfgang Bangerth Date: Tue, 18 Mar 2008 21:47:30 +0000 (+0000) Subject: Don't access past-the-end iterators. X-Git-Tag: v8.0.0~9265 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d5c423f947e2fd0bb428e0f1ef3c9790d7979d8;p=dealii.git Don't access past-the-end iterators. git-svn-id: https://svn.dealii.org/trunk@15909 0785d39b-7218-0410-832d-ea1e28bc413d --- 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 {