diff --git a/libsrc/occ/occgeom.cpp b/libsrc/occ/occgeom.cpp index 0d1c8c44..c942a50d 100644 --- a/libsrc/occ/occgeom.cpp +++ b/libsrc/occ/occgeom.cpp @@ -14,6 +14,7 @@ #include "occgeom.hpp" #include "Partition_Spliter.hxx" +#include #include #include #include @@ -1638,8 +1639,12 @@ namespace netgen if(!result) { - delete occgeo; - return NULL; + result = BinTools::Read(occgeo->shape, filename.string().c_str()); + if (!result) + { + delete occgeo; + throw Exception("Could not read BREP file " + filename.string()); + } } occgeo->changed = 1;