From: eap Date: Tue, 13 Nov 2012 07:21:40 +0000 (+0000) Subject: fix GetLastError() X-Git-Tag: V6_6_0rc1~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5894f538ab883d292b94d3fa20000034c4d7e963;p=modules%2Fsmesh.git fix GetLastError() --- diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 62c174fc7..370ce9b57 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -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(); } //=======================================================================