fix GetLastError()

This commit is contained in:
eap 2012-11-13 07:21:40 +00:00
parent 9f37441960
commit 5894f538ab

View File

@ -649,8 +649,8 @@ SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedElems()
SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError() SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError()
{ {
SMESH::ComputeError* errOut = new SMESH::ComputeError; SMESH::ComputeError_var errOut = new SMESH::ComputeError;
SMESH_ComputeErrorPtr& errIn = getEditor().GetError(); SMESH_ComputeErrorPtr& errIn = getEditor().GetError();
if ( errIn && !errIn->IsOK() ) if ( errIn && !errIn->IsOK() )
{ {
errOut->code = -( errIn->myName < 0 ? errIn->myName + 1: errIn->myName ); // -1 -> 0 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->subShapeID = -1;
errOut->hasBadMesh = !errIn->myBadElements.empty(); errOut->hasBadMesh = !errIn->myBadElements.empty();
} }
return errOut; return errOut._retn();
} }
//======================================================================= //=======================================================================