mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-25 09:10:33 +05:00
0022221: [CEA 819] Error "'NoneType' object is not callable" at Salome closure
This commit is contained in:
parent
3ad606e262
commit
3ca6ffd9ba
@ -49,6 +49,8 @@
|
|||||||
#include <SUIT_Session.h>
|
#include <SUIT_Session.h>
|
||||||
#include <SUIT_ViewManager.h>
|
#include <SUIT_ViewManager.h>
|
||||||
|
|
||||||
|
#include <PyInterp_Interp.h>
|
||||||
|
|
||||||
#include <OCCViewer_ViewWindow.h>
|
#include <OCCViewer_ViewWindow.h>
|
||||||
#include <OCCViewer_ViewPort3d.h>
|
#include <OCCViewer_ViewPort3d.h>
|
||||||
#include <OCCViewer_ViewModel.h>
|
#include <OCCViewer_ViewModel.h>
|
||||||
@ -1709,17 +1711,17 @@ bool GeometryGUI::activateModule( SUIT_Study* study )
|
|||||||
|
|
||||||
// import Python module that manages GEOM plugins (need to be here because SalomePyQt API uses active module)
|
// import Python module that manages GEOM plugins (need to be here because SalomePyQt API uses active module)
|
||||||
PyGILState_STATE gstate = PyGILState_Ensure();
|
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
PyObject* pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
|
PyObjWrapper pluginsmanager = PyImport_ImportModuleNoBlock((char*)"salome_pluginsmanager");
|
||||||
if (pluginsmanager == NULL)
|
if ( !pluginsmanager ) {
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
PyObject* result =
|
PyObjWrapper result =
|
||||||
PyObject_CallMethod(pluginsmanager, (char*)"initialize", (char*)"isss", 1, "geom",
|
PyObject_CallMethod(pluginsmanager, (char*)"initialize", (char*)"isss", 1, "geom",
|
||||||
tr("MEN_NEW_ENTITY").toStdString().c_str(),
|
tr("MEN_NEW_ENTITY").toStdString().c_str(),
|
||||||
tr("GEOM_PLUGINS_OTHER").toStdString().c_str());
|
tr("GEOM_PLUGINS_OTHER").toStdString().c_str());
|
||||||
if (result == NULL)
|
if ( !result )
|
||||||
PyErr_Print();
|
PyErr_Print();
|
||||||
Py_XDECREF(result);
|
|
||||||
}
|
}
|
||||||
PyGILState_Release(gstate);
|
PyGILState_Release(gstate);
|
||||||
// end of GEOM plugins loading
|
// end of GEOM plugins loading
|
||||||
|
Loading…
Reference in New Issue
Block a user