From: Wolfgang Bangerth <bangerth@math.tamu.edu>
Date: Sun, 27 Jan 2008 03:48:48 +0000 (+0000)
Subject: Add an exception apparently forgotten.
X-Git-Tag: v8.0.0~9460
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fe3ee170a4502621dd62c15daf97f6dc66a0151;p=dealii.git

Add an exception apparently forgotten.

git-svn-id: https://svn.dealii.org/trunk@15690 0785d39b-7218-0410-832d-ea1e28bc413d
---

diff --git a/deal.II/deal.II/source/numerics/derivative_approximation.cc b/deal.II/deal.II/source/numerics/derivative_approximation.cc
index e284dcf7a0..b69e68ab83 100644
--- a/deal.II/deal.II/source/numerics/derivative_approximation.cc
+++ b/deal.II/deal.II/source/numerics/derivative_approximation.cc
@@ -78,7 +78,7 @@ get_projected_derivative (const FEValues<dim>  &fe_values,
 	(1, Vector<double>(fe_values.get_fe().n_components()));
       fe_values.get_function_values (solution, values);
       return values[0](component);
-    };
+    }
 }
 
 
@@ -627,6 +627,8 @@ approximate_derivative (const Mapping<dim>    &mapping,
   Assert (derivative_norm.size() == dof_handler.get_tria().n_active_cells(),
 	  ExcInvalidVectorLength (derivative_norm.size(),
 				  dof_handler.get_tria().n_active_cells()));
+  Assert (component < dof_handler.get_fe().n_components(),
+	  ExcIndexRange (component, 0, dof_handler.get_fe().n_components()));
 
   const unsigned int n_threads = multithread_info.n_default_threads;
   std::vector<IndexInterval> index_intervals