Skip to content
Snippets Groups Projects
Commit 2fe44e56 authored by Oliver Sander's avatar Oliver Sander Committed by Christoph Grüninger
Browse files

[bugfix] Access x[0] only if x has at least one entry


(cherry picked from commit 7faf61fe)
Signed-off-by: default avatarChristoph Grüninger <gruenich@dune-project.org>
parent 54cd4676
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,8 @@ struct FieldVectorMainTest
FieldVector<ft,d> w(2);
FieldVector<ft,d> z(2);
const FieldVector<ft,d> x(z);
a = x[0];
if (x.size()>0)
a = x[0];
bool b DUNE_UNUSED;
rt n DUNE_UNUSED;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment