]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
PAL10953: prevent sigsegv in GetHypothesisList()
authoreap <eap@opencascade.com>
Thu, 29 Dec 2005 15:00:45 +0000 (15:00 +0000)
committereap <eap@opencascade.com>
Thu, 29 Dec 2005 15:00:45 +0000 (15:00 +0000)
src/SMESH_I/SMESH_Mesh_i.cxx

index d8445554f8678f0294de357f9589877ffeccfb6a..daf37787f3653b7dfe3b0d64ede422aff91508ec 100644 (file)
@@ -380,7 +380,7 @@ SMESH_Hypothesis::Hypothesis_Status
     int hypId = myHyp->GetId();
     status = _impl->AddHypothesis(myLocSubShape, hypId);
     if ( !SMESH_Hypothesis::IsStatusFatal(status) ) {
-      _mapHypo[hypId] = myHyp;
+      _mapHypo[hypId] = SMESH::SMESH_Hypothesis::_duplicate( myHyp );
       // assure there is a corresponding submesh
       if ( !_impl->IsMainShape( myLocSubShape )) {
         int shapeId = _impl->GetMeshDS()->ShapeToIndex( myLocSubShape );