mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-06 04:04:18 +05:00
TC 5.1.5: SIGSEGV on closing study
This commit is contained in:
parent
7408a75fe6
commit
b9038c7474
@ -623,14 +623,12 @@ char* GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
|
||||
{
|
||||
SalomeApp_Study* study = getStudy();
|
||||
if ( study ) {
|
||||
char * objIOR = GEOMBase::GetIORFromObject( object );
|
||||
CORBA::String_var objIOR = GEOMBase::GetIORFromObject( object );
|
||||
std::string IOR( objIOR );
|
||||
free( objIOR );
|
||||
if ( IOR != "" ) {
|
||||
_PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) );
|
||||
if ( SO ) {
|
||||
return (char*) TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString();
|
||||
}
|
||||
if ( SO )
|
||||
return (char*) TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString();
|
||||
}
|
||||
}
|
||||
return (char*)"";
|
||||
@ -1108,7 +1106,7 @@ void GEOMBase_Helper::addSubshapesToFather( QMap<QString, GEOM::GEOM_Object_var>
|
||||
if ( aFatherEntry != "") { // additional checking that object is valid 0020598 EDF 1191
|
||||
GEOM::GEOM_Object_var aFindedObject = findObjectInFather(aFatherObj, it.key().toLatin1().data() );
|
||||
//Add Object to study if its not exist
|
||||
if ( aFindedObject->_is_nil() )
|
||||
if ( aFindedObject->_is_nil() )
|
||||
GeometryGUI::GetGeomGen()->AddInStudy(GeometryGUI::ClientStudyToStudy(aDStudy),
|
||||
it.value(), it.key().toLatin1().data(), aFatherObj );
|
||||
}
|
||||
|
@ -1059,9 +1059,8 @@ bool GroupGUI_GroupDlg::execute(ObjectList& objects)
|
||||
|
||||
SalomeApp_Study* study = getStudy();
|
||||
if (study) {
|
||||
char* objIOR = GEOMBase::GetIORFromObject(aGroup);
|
||||
CORBA::String_var objIOR = GEOMBase::GetIORFromObject(aGroup);
|
||||
std::string IOR(objIOR);
|
||||
free(objIOR);
|
||||
if (IOR != "") {
|
||||
_PTR(SObject) SO (study->studyDS()->FindObjectIOR(IOR));
|
||||
if (SO) {
|
||||
|
@ -177,7 +177,7 @@ bool MeasureGUI_BndBoxDlg::getParameters( double& theXmin, double& theXmax,
|
||||
if ( CORBA::is_nil(aGeomGen) )
|
||||
return false;
|
||||
|
||||
char* IOR = GEOMBase::GetIORFromObject( myObj );
|
||||
CORBA::String_var IOR = GEOMBase::GetIORFromObject( myObj );
|
||||
GEOM::GEOM_Object_var anObject = aGeomGen->GetIORFromString(IOR);
|
||||
if ( CORBA::is_nil(anObject) )
|
||||
return false;
|
||||
|
@ -246,9 +246,8 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument()
|
||||
aSelMgr->clearSelected();
|
||||
|
||||
Standard_Boolean isOk;
|
||||
char* objIOR = GEOMBase::GetIORFromObject(myObject);
|
||||
CORBA::String_var objIOR = GEOMBase::GetIORFromObject(myObject);
|
||||
Handle(GEOM_AISShape) aSh = GEOMBase::ConvertIORinGEOMAISShape(objIOR, isOk, true);
|
||||
free(objIOR);
|
||||
if (!isOk || aSh.IsNull())
|
||||
return;
|
||||
|
||||
|
@ -529,5 +529,5 @@ void TransformationGUI_MirrorDlg::addSubshapesToStudy()
|
||||
return;
|
||||
}
|
||||
addSubshapesToFather(objMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user