diff --git a/libsrc/csg/specpoin.cpp b/libsrc/csg/specpoin.cpp index 39066362..33b098f5 100644 --- a/libsrc/csg/specpoin.cpp +++ b/libsrc/csg/specpoin.cpp @@ -432,7 +432,7 @@ namespace netgen auto rev0 = dynamic_cast (geometry->GetSurface(locsurf[0])); - auto rev1 = dynamic_cast (geometry->GetSurface(locsurf[1])); + auto rev1 = locsurf.Size() > 1 ? dynamic_cast (geometry->GetSurface(locsurf[1])) : nullptr; if (numprim == 2 && rev0 && rev1) { NgArray> pts;