Gui: Hold the GIL when clearing the form attribute

Inside TaskDialogPython::clearForm() the interpreter may execute a lot of things where at the some point the GIL must be hold.

This very likely fixes https://github.com/FreeCAD/FreeCAD/issues/22863

@thyssentishman
Please check this branch
This commit is contained in:
wmayer
2025-08-14 17:36:33 +02:00
committed by Chris Hennes
parent 17ec624997
commit b314d71c24

View File

@@ -634,6 +634,7 @@ void TaskDialogPython::appendForm(QWidget* form, const QPixmap& icon)
void TaskDialogPython::clearForm()
{
Base::PyGILStateLocker lock;
try {
// The widgets stored in the 'form' attribute will be deleted.
// Thus, set this attribute to None to make sure that when using