[Libreoffice-commits] core.git: pyuno/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 8 12:07:44 UTC 2020
pyuno/source/module/pyuno_runtime.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 648fa0ab6bd5399422951f848ca86cb710b1bd52
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jan 8 10:31:37 2020 +0100
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Wed Jan 8 13:07:09 2020 +0100
pyuno: remove redundant if
Change-Id: Ie0359efa8777439818e357a14db3e2474e936ef6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86403
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Tested-by: Jenkins
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
More information about the Libreoffice-commits
mailing list