From f0881b5dbf54ac9508114fd58fcd7b3dba182175 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 11 Mar 2024 07:59:25 +0100 Subject: [PATCH] App: Fix segmentation fault while dragging object For more details see: https://forum.freecad.org/viewtopic.php?t=86001 The reason of the crash is that the GIL is not locked while accessing certain Python functions --- src/App/GroupExtension.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/App/GroupExtension.h b/src/App/GroupExtension.h index 9635ef536d..810ff0d410 100644 --- a/src/App/GroupExtension.h +++ b/src/App/GroupExtension.h @@ -147,6 +147,7 @@ public: //override the documentobjectextension functions to make them available in python bool allowObject(DocumentObject* obj) override { + Base::PyGILStateLocker locker; Py::Object pyobj = Py::asObject(obj->getPyObject()); EXTENSION_PROXY_ONEARG(allowObject, pyobj);