From: vsr Date: Tue, 1 Dec 2015 14:36:05 +0000 (+0300) Subject: Additional change to previous commit to avoid memory corruption X-Git-Tag: V8_0_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6c9327744f9e03741a2371d5a7f90b1ab8744377;p=modules%2Fgeom.git Additional change to previous commit to avoid memory corruption --- diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx index 8e3dab46b..229024df4 100644 --- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx @@ -1026,6 +1026,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric std::string err_description=""; PyObject* new_stderr = newPyStdOut(err_description); PyObject* old_stderr = PySys_GetObject((char*)"stderr"); + Py_INCREF(old_stderr); PySys_SetObject((char*)"stderr", new_stderr); PyErr_Print(); PySys_SetObject((char*)"stderr", old_stderr);