diff options
author | Fellype do Nascimento <fellype(at)gmail.com> | 2017-11-29 17:28:58 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-12-02 06:31:04 +0700 |
commit | b285d0650e849850b2ccf3acdb2614d343d74841 (patch) | |
tree | ae5c1bae086b9cbdd405893a221027258ebee0f2 /academic/scidavis/integration_with_python_crash_bug_320.patch | |
parent | 20970278afd68598cd1f861bbbdab02f6250831b (diff) | |
download | slackbuilds-b285d0650e849850b2ccf3acdb2614d343d74841.tar.gz |
academic/scidavis: Patched to fix crashes.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'academic/scidavis/integration_with_python_crash_bug_320.patch')
-rw-r--r-- | academic/scidavis/integration_with_python_crash_bug_320.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/academic/scidavis/integration_with_python_crash_bug_320.patch b/academic/scidavis/integration_with_python_crash_bug_320.patch new file mode 100644 index 0000000000..bef207656d --- /dev/null +++ b/academic/scidavis/integration_with_python_crash_bug_320.patch @@ -0,0 +1,20 @@ +diff --git a/libscidavis/src/PythonScript.cpp b/libscidavis/src/PythonScript.cpp +index 27d4eec..a8b8ac2 100644 +--- a/libscidavis/src/PythonScript.cpp ++++ b/libscidavis/src/PythonScript.cpp +@@ -43,6 +43,7 @@ PythonScript::PythonScript(PythonScripting *env, const QString &code, QObject *c + : Script(env, code, context, name) + { + PyCode = NULL; ++ PyGILState_STATE state = PyGILState_Ensure(); + // Old: All scripts share a global namespace, and module top-level has its own nonstandard local namespace + modLocalDict = PyDict_New(); + // A bit of a hack, but we need either IndexError or len() from __builtins__. +@@ -71,6 +72,7 @@ PythonScript::PythonScript(PythonScripting *env, const QString &code, QObject *c + else + PyErr_Print(); + // "self" is unique to each script, so they can't all run in the __main__ namespace ++ PyGILState_Release(state); + setQObject(Context, "self"); + } + |