Salome HOME
23395: EDF 13855 - Crash SALOME when creating a mesh
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_ProjectionSource2D_i.cxx
index 93cd392c0f14609ede6d0eebaba4651f9b684eed..0c030a040e9d69c63118b0efa09b1cd27eb0c190 100644 (file)
@@ -298,12 +298,16 @@ void StdMeshers_ProjectionSource2D_i::LoadFrom( const char* theStream )
 
   myCorbaMesh = SMESH::SMESH_Mesh::_duplicate( mesh );
 
-  GetImpl()->SetSourceMesh       ( meshImpl );
-  GetImpl()->SetSourceFace       ( shapes[ SRC_FACE ] );
-  GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX1 ],
-                                   shapes[ SRC_VERTEX2 ],
-                                   shapes[ TGT_VERTEX1 ],
-                                   shapes[ TGT_VERTEX2 ]);
+  try {
+    GetImpl()->SetSourceMesh       ( meshImpl );
+    GetImpl()->SetSourceFace       ( shapes[ SRC_FACE ] );
+    GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX1 ],
+                                     shapes[ SRC_VERTEX2 ],
+                                     shapes[ TGT_VERTEX1 ],
+                                     shapes[ TGT_VERTEX2 ]);
+  }
+  catch( ... ) {
+  }
   myBaseImpl->LoadFrom( is );
 
   std::istringstream str( theStream );