]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
TC 5.1.5: SIGSEGV on closing study
authordmv <dmv@opencascade.com>
Mon, 11 Oct 2010 12:04:48 +0000 (12:04 +0000)
committerdmv <dmv@opencascade.com>
Mon, 11 Oct 2010 12:04:48 +0000 (12:04 +0000)
src/GEOMBase/GEOMBase_Helper.cxx
src/GroupGUI/GroupGUI_GroupDlg.cxx
src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx
src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx
src/TransformationGUI/TransformationGUI_MirrorDlg.cxx

index 64bdc325f4dcb9f1378f7066fb1b00b21b07875b..02bc2980f5c0955feefb30369c191a00d171e312 100755 (executable)
@@ -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 );
         }
index dcee8dbad4c509d5c5db10eb2b406139b0b64699..9771d89f67367d57e9f3f91f81292aafdc257abe 100644 (file)
@@ -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) {
index 50151730768205a81c36006a5dd467daa8ac9202..5344991b4b555fb36e6c2f1284d8b3e1e78d7e61 100644 (file)
@@ -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;
index 15796bc2f95ed019a3d4c723d831e4acbee89f57..717dfa4a6819f090e89e0d3bce5ae6b2cd50560a 100644 (file)
@@ -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;
 
index bead550155075e9de8cd6e60a50da36a2a6451e0..1b8810cbd1c2cf361a8a403d38fb77dac56a4c6f 100644 (file)
@@ -529,5 +529,5 @@ void TransformationGUI_MirrorDlg::addSubshapesToStudy()
       return;
     }
     addSubshapesToFather(objMap);
-  }
+    }
 }