From 01874ca898cb5518d4ee2ad5560309ea24be258e Mon Sep 17 00:00:00 2001 From: Pieter Hijma Date: Thu, 27 Jun 2024 14:17:24 +0200 Subject: [PATCH] Core: Fix a missing Python interpreter lock ReportView has a missing Python interpreter lock. It is not breaking FreeCAD in general but it is deemed a bug nonetheless. See the issue. --- src/Gui/ReportView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Gui/ReportView.cpp b/src/Gui/ReportView.cpp index 6749855f81..d81540f79b 100644 --- a/src/Gui/ReportView.cpp +++ b/src/Gui/ReportView.cpp @@ -377,11 +377,13 @@ public: ~Data() { if (replace_stdout) { + Base::PyGILStateLocker lock; Py_DECREF(replace_stdout); replace_stdout = nullptr; } if (replace_stderr) { + Base::PyGILStateLocker lock; Py_DECREF(replace_stderr); replace_stderr = nullptr; }