Skip to content
Snippets Groups Projects
Commit 7faf61fe authored by Oliver Sander's avatar Oliver Sander
Browse files

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

parent cb20d032
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,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