Gui: fix crash in PythonCommand::isChecked()

This very likely fixes the crash reported at https://forum.freecad.org/viewtopic.php?t=86874
This commit is contained in:
wmayer
2024-04-13 12:47:20 +02:00
committed by wwmayer
parent 69bcabeb0b
commit a1194f5f57

View File

@@ -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 "