From: mkr Date: Thu, 21 Jun 2018 13:39:36 +0000 (+0300) Subject: 0023568: [CEA 2245] SALOME crashes when you dump a PARAVIS study in a script file X-Git-Tag: SHAPER_V9_1_0RC1~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a2529bbbbdadeef1e9ff4ba7103523cd49fe64f1;p=modules%2Fparavis.git 0023568: [CEA 2245] SALOME crashes when you dump a PARAVIS study in a script file Fix a bug --- diff --git a/src/PVGUI/PVGUI_Module.cxx b/src/PVGUI/PVGUI_Module.cxx index d1206bbc..342af676 100644 --- a/src/PVGUI/PVGUI_Module.cxx +++ b/src/PVGUI/PVGUI_Module.cxx @@ -846,7 +846,7 @@ QString PVGUI_Module::getTraceString() vtkPythonScopeGilEnsurer psge; PyObject * mods(PySys_GetObject(const_cast("modules"))); PyObject * trace_mod(PyDict_GetItemString(mods, "paraview.smtrace")); // module was already (really) imported by vtkSMTrace - if (PyModule_Check(trace_mod)) { + if (trace_mod && trace_mod != Py_None && PyModule_Check(trace_mod)) { vtkSmartPyObject save_cam(PyObject_GetAttrString(trace_mod, const_cast("SaveCameras"))); vtkSmartPyObject camera_trace(PyObject_CallMethod(save_cam, const_cast("get_trace"), NULL)); // Convert to a single string