Salome HOME
IPAL54379: NETGEN crashes SALOME if all faces belong to a sub-mesh
authoreap <eap@opencascade.com>
Thu, 12 Apr 2018 13:46:52 +0000 (16:46 +0300)
committereap <eap@opencascade.com>
Thu, 12 Apr 2018 13:46:52 +0000 (16:46 +0300)
src/NETGENPlugin/NETGENPlugin_Mesher.cxx

index 4cab2a9e074b5818c5aa2cc9737456d11268c730..3c902e3d457121e717fbc91b9b0e5a2d582b88db 100644 (file)
@@ -3042,8 +3042,9 @@ bool NETGENPlugin_Mesher::Compute()
       }
 
       // Build viscous layers
-      if ( _isViscousLayers2D ||
-           StdMeshers_ViscousLayers2D::HasProxyMesh( TopoDS::Face( occgeo.fmap(1) ), *_mesh ))
+      if (( _isViscousLayers2D ) ||
+          ( !occgeo.fmap.IsEmpty() &&
+            StdMeshers_ViscousLayers2D::HasProxyMesh( TopoDS::Face( occgeo.fmap(1) ), *_mesh )))
       {
         if ( !internals.hasInternalVertexInFace() ) {
           FillSMesh( occgeo, *_ngMesh, initState, *_mesh, nodeVec, comment );