From 5894f538ab883d292b94d3fa20000034c4d7e963 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 13 Nov 2012 07:21:40 +0000 Subject: [PATCH] fix GetLastError() --- src/SMESH_I/SMESH_MeshEditor_i.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); } //======================================================================= -- 2.39.2