From 9b7c8cdf912f19e2c694e22a64839aa1d5e5aa4e Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 21 Feb 2006 15:43:20 +0000 Subject: [PATCH] Fixed Bug CTH11627 - V1.0.1 on RH8: Crash on closing a study --- src/PyInterp/PyInterp_base.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PyInterp/PyInterp_base.cxx b/src/PyInterp/PyInterp_base.cxx index a75c39bdd..e12bb9efc 100644 --- a/src/PyInterp/PyInterp_base.cxx +++ b/src/PyInterp/PyInterp_base.cxx @@ -101,8 +101,11 @@ void PyInterp_base::initialize() // Create cStringIO to capture stdout and stderr PycString_IMPORT; //PycStringIO = (PycStringIO_CAPI *)xxxPyCObject_Import("cStringIO", "cStringIO_CAPI"); - _vout = PycStringIO->NewOutput(128); - _verr = PycStringIO->NewOutput(128); + if( PycStringIO ) // CTH11627 : additional check + { + _vout = PycStringIO->NewOutput(128); + _verr = PycStringIO->NewOutput(128); + } // All the initRun outputs are redirected to the standard output (console) initRun(); -- 2.39.2