From 6c9327744f9e03741a2371d5a7f90b1ab8744377 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 1 Dec 2015 17:36:05 +0300 Subject: [PATCH] Additional change to previous commit to avoid memory corruption --- src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx | 1 + 1 file changed, 1 insertion(+) 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); -- 2.39.2