]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
IPAL21302 Selection of the Hypothesis without Geometry leads to Unknown exception...
authoreap <eap@opencascade.com>
Tue, 11 Aug 2009 09:09:55 +0000 (09:09 +0000)
committereap <eap@opencascade.com>
Tue, 11 Aug 2009 09:09:55 +0000 (09:09 +0000)
src/SMESHGUI/SMESHGUI_MeshOp.cxx

index 35dcb43bab4e2b490942d53eb175ccab031ac676..b7a6b099d23d5b6eeb770ca61e985d64025b6f49 100644 (file)
@@ -1070,10 +1070,10 @@ void SMESHGUI_MeshOp::createHypothesis (const int theDim,
       QString anObjEntry = "";
       anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
       if ( anObjEntry == "" ) {
-       anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
+        anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
         _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
         GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
-       anObjEntry = aGeomVar->GetStudyEntry();
+        anObjEntry = ( aGeomVar->_is_nil() ) ? "" : anObjEntry = aGeomVar->GetStudyEntry();
       }
 
       aCreator->setShapeEntry( anObjEntry );