diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-01-08 10:31:37 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-01-08 13:07:09 +0100 |
commit | 648fa0ab6bd5399422951f848ca86cb710b1bd52 (patch) | |
tree | 89beb857d80f30f43fa4fe61c452008e973df9ec /pyuno | |
parent | fb4e15a89d8d8f081c0c152e5047bc0e76870b39 (diff) |
pyuno: remove redundant if
Change-Id: Ie0359efa8777439818e357a14db3e2474e936ef6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86403
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
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 |