From ce3f3429d4668024d0d062b76bd39b69436e26de Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Mon, 19 Oct 2020 15:27:36 +0200 Subject: [PATCH] fix range check exception in tutorials --- libsrc/csg/specpoin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;