]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix GetLastError()
authoreap <eap@opencascade.com>
Tue, 13 Nov 2012 07:21:40 +0000 (07:21 +0000)
committereap <eap@opencascade.com>
Tue, 13 Nov 2012 07:21:40 +0000 (07:21 +0000)
src/SMESH_I/SMESH_MeshEditor_i.cxx

index 62c174fc78b58a75467adcbde63b28b299779514..370ce9b57bab788a504efd0475c7d1ede31c458a 100644 (file)
@@ -649,8 +649,8 @@ SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedElems()
 
 SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError()
 {
-  SMESH::ComputeError*   errOut = new SMESH::ComputeError;
-  SMESH_ComputeErrorPtr& errIn  = getEditor().GetError();
+  SMESH::ComputeError_var errOut = new SMESH::ComputeError;
+  SMESH_ComputeErrorPtr&  errIn  = getEditor().GetError();
   if ( errIn && !errIn->IsOK() )
   {
     errOut->code       = -( errIn->myName < 0 ? errIn->myName + 1: errIn->myName ); // -1 -> 0
@@ -658,7 +658,7 @@ SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError()
     errOut->subShapeID = -1;
     errOut->hasBadMesh = !errIn->myBadElements.empty();
   }
-  return errOut;
+  return errOut._retn();
 }
 
 //=======================================================================