diff options
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index e0987cd63cd7..3e2bb0c6b0a6 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -1001,9 +1001,7 @@ PyThreadAttach::~PyThreadAttach() if (m_isNewState) { // Clear needs GIL! PyThreadState_Clear( tstate ); - } - if (m_isNewState) - { // note: PyThreadState_Delete(tstate) cannot be called, it will assert + // note: PyThreadState_Delete(tstate) cannot be called, it will assert // because it requires a PyThreadState to be set, but not the tstate! PyThreadState_DeleteCurrent(); } @@ -1017,6 +1015,7 @@ PyThreadDetach::PyThreadDetach() { tstate = PyThreadState_Get(); PyEval_ReleaseThread( tstate ); + // tstate must not be deleted here! lots of pointers to it on the stack } /** Acquires the global interpreter lock again |