Skip to content

Commit 96a3a46

Browse files
Fix crash in 3D.
1 parent 493d5cb commit 96a3a46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/vssolution3d.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,6 +1679,7 @@ void VisualizationSceneSolution3d::Prepare()
16791679
Vector nz(nv);
16801680

16811681
Table ba_to_be; // boundary_attribute--to--boundary_element
1682+
if (dim > 1) // Boundaries are just points in 1D
16821683
{
16831684
Table be_to_ba;
16841685
be_to_ba.MakeI(ne);
@@ -1708,7 +1709,7 @@ void VisualizationSceneSolution3d::Prepare()
17081709

17091710
const Array<int> &attributes =
17101711
((dim == 3) ? mesh->bdr_attributes : mesh->attributes);
1711-
for (int d = 0; d < attributes.Size(); d++)
1712+
for (int d = 0; d < attributes.Size() && dim > 1; d++)
17121713
{
17131714
const int attr = attributes[d]-1;
17141715

0 commit comments

Comments
 (0)