From 0ce05e0d7ae374a8c78c16c2e3b3a168de5545fb Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 19 Oct 2009 08:10:06 +0000 Subject: [PATCH] Issue 0020536: EDF 1136 GUI: SIGSEGV for Python module if import process of GUI component raises an exception --- src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx | 4 ++-- .../SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx index 42e24296b..80da8eb31 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx @@ -157,8 +157,8 @@ void SALOME_PYQT_Module::getEngineIOR() if ( !myInterp || !myModule ) return; - if ( PyObject_HasAttrString( myModule->get() , "engineIOR" ) ) { - PyObjWrapper res( PyObject_CallMethod( myModule->get(), (char*)"engineIOR", (char*)"" ) ); + if ( PyObject_HasAttrString( myModule , "engineIOR" ) ) { + PyObjWrapper res( PyObject_CallMethod( myModule, (char*)"engineIOR", (char*)"" ) ); if ( !res ) { PyErr_Print(); } diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h index f9066c640..44c4a71e2 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUILight/SALOME_PYQT_ModuleLight.h @@ -63,9 +63,9 @@ private: bool myLastActivateStatus; //!< latest module activation status protected: - PyObjWrapper* myModule; //!< Python GUI module - PyInterp_Interp* myInterp; //!< current Python subinterpreter - static InterpMap myInterpMap; //!< study to Python subinterpreter map + PyObject* myModule; //!< Python GUI module + PyInterp_Interp* myInterp; //!< current Python subinterpreter + static InterpMap myInterpMap; //!< study to Python subinterpreter map public: SALOME_PYQT_ModuleLight(); -- 2.39.2