]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Fix cmake compilation problem.
authorrnv <rnv@opencascade.com>
Wed, 17 Apr 2013 11:04:20 +0000 (11:04 +0000)
committerrnv <rnv@opencascade.com>
Wed, 17 Apr 2013 11:04:20 +0000 (11:04 +0000)
src/GEOM_I/GEOM_Gen_i.cc

index 9bde30e654de52b7344a68471d7dff48d81b77d6..b94b5f81f5f6594778c4fed07cff9b5b617ebf54 100644 (file)
@@ -669,7 +669,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
   // Find the current Study and StudyBuilder
   SALOMEDS::Study_var aStudy = theObject->GetStudy();
   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
-
+  SALOMEDS::SObject_var aNewSO;
   // Retrieve a TopoDS_Shape from byte stream
   TopoDS_Shape aTopology;
   std::istringstream aStreamedBrep((char*) &theStream[0]);
@@ -677,11 +677,10 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
   try {
     BRepTools::Read(aTopology, aStreamedBrep, aBuilder);
   } catch (Standard_Failure) {
-    return false;
+    return aNewSO._retn();
   }
 
   // SObject of the created shape is theObject or new Child of Component if theObject == geom component
-  SALOMEDS::SObject_var aNewSO;
   if (strcmp(theObject->GetFatherComponent()->GetID(),theObject->GetID()) == 0) {
     aNewSO = aStudyBuilder->NewObject(theObject);
   } else aNewSO = SALOMEDS::SObject::_duplicate(theObject);