diff --git a/libsrc/meshing/meshclass.cpp b/libsrc/meshing/meshclass.cpp index 4ed54ae4..50b1e5e6 100644 --- a/libsrc/meshing/meshclass.cpp +++ b/libsrc/meshing/meshclass.cpp @@ -5757,7 +5757,10 @@ namespace netgen else { double vlam[3]; - int velement = GetElementOfPoint(p,vlam,NULL,build_searchtree,allowindex); + int velement = 0; + + if(GetNE()) + GetElementOfPoint(p,vlam,NULL,build_searchtree,allowindex); //(*testout) << "p " << p << endl; //(*testout) << "velement " << velement << endl;