summaryrefslogtreecommitdiffstats
path: root/libpyside/globalreceiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libpyside/globalreceiver.cpp')
-rw-r--r--libpyside/globalreceiver.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpyside/globalreceiver.cpp b/libpyside/globalreceiver.cpp
index ace1692..5639c3d 100644
--- a/libpyside/globalreceiver.cpp
+++ b/libpyside/globalreceiver.cpp
@@ -71,6 +71,8 @@ using namespace PySide;
DynamicSlotData::DynamicSlotData(int id, PyObject* callback, GlobalReceiver* parent)
: m_id(id), m_pythonSelf(0), m_pyClass(0), m_weakRef(0), m_parent(parent)
{
+ Shiboken::GilState gil;
+
m_isMethod = PyMethod_Check(callback);
if (m_isMethod) {
//Can not store calback pointe because this will be destroyed at the end of the scope
@@ -97,6 +99,7 @@ PyObject* DynamicSlotData::call(PyObject* args)
PyObject* callback = m_callback;
//create a callback based on method data
+ Shiboken::GilState gil;
if (m_isMethod)
#ifdef IS_PY3K
callback = PyMethod_New(callback, m_pythonSelf);