From: eap Date: Tue, 11 Aug 2009 09:09:55 +0000 (+0000) Subject: IPAL21302 Selection of the Hypothesis without Geometry leads to Unknown exception... X-Git-Tag: V5_1_3rc1~121 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eee601b7b1844267428174c6583087465d8c2fb5;p=modules%2Fsmesh.git IPAL21302 Selection of the Hypothesis without Geometry leads to Unknown exception. Regress to 5.1.2 --- diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 35dcb43ba..b7a6b099d 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -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 );