From a1194f5f576975275ccc6d781ffa9364306301eb Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 13 Apr 2024 12:47:20 +0200 Subject: [PATCH] Gui: fix crash in PythonCommand::isChecked() This very likely fixes the crash reported at https://forum.freecad.org/viewtopic.php?t=86874 --- src/Gui/Command.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index e263ddc48e..750cd4fbf0 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -1462,6 +1462,7 @@ bool PythonCommand::isCheckable() const bool PythonCommand::isChecked() const { + Base::PyGILStateLocker lock; PyObject* item = PyDict_GetItemString(_pcPyResourceDict,"Checkable"); if (!item) { throw Base::ValueError("PythonCommand::isChecked(): Method GetResources() of the Python "