From eee601b7b1844267428174c6583087465d8c2fb5 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 11 Aug 2009 09:09:55 +0000 Subject: [PATCH] IPAL21302 Selection of the Hypothesis without Geometry leads to Unknown exception. Regress to 5.1.2 --- src/SMESHGUI/SMESHGUI_MeshOp.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.39.2