]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Don't access past-the-end iterators.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 18 Mar 2008 21:47:30 +0000 (21:47 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 18 Mar 2008 21:47:30 +0000 (21:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@15909 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_constraints.templates.h

index c264bbc178f26ec8e8d257f9e1deda30661730f8..3a89ede4823dff6d150495cfe9493dd8b350347d 100644 (file)
@@ -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<double>            &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
            {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.