Skip to content

Commit

Permalink
Core: Fix a missing Python interpreter lock
Browse files Browse the repository at this point in the history
ReportView has a missing Python interpreter lock.  It is not breaking
FreeCAD in general but it is deemed a bug nonetheless.  See the issue.
  • Loading branch information
pieterhijma authored and chennes committed Jun 27, 2024
1 parent 8f32cab commit 01874ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Gui/ReportView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,13 @@ class ReportOutput::Data
~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;
}
Expand Down

0 comments on commit 01874ca

Please sign in to comment.