From: vsr Date: Mon, 19 Oct 2009 08:10:06 +0000 (+0000) Subject: Issue 0020536: EDF 1136 GUI: SIGSEGV for Python module if import process of GUI compo... X-Git-Tag: RELIQUAT_5x_30102009~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0ce05e0d7ae374a8c78c16c2e3b3a168de5545fb;p=modules%2Fgui.git Issue 0020536: EDF 1136 GUI: SIGSEGV for Python module if import process of GUI component raises an exception --- 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();