py3: fix several crashes

This commit is contained in:
wmayer
2017-06-04 11:12:53 +02:00
parent af699ab7e2
commit 057192f314
2 changed files with 42 additions and 7 deletions

View File

@@ -1071,6 +1071,7 @@ const char* PythonCommand::getAccel() const
bool PythonCommand::isCheckable() const
{
Base::PyGILStateLocker lock;
PyObject* item = PyDict_GetItemString(_pcPyResourceDict,"Checkable");
return item ? true : false;
}