diff options
-rw-r--r-- | sources/pyside6/libpyside/globalreceiverv2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/globalreceiverv2.cpp b/sources/pyside6/libpyside/globalreceiverv2.cpp index c623d05fa..b8c542eb1 100644 --- a/sources/pyside6/libpyside/globalreceiverv2.cpp +++ b/sources/pyside6/libpyside/globalreceiverv2.cpp @@ -110,6 +110,11 @@ GlobalReceiverKey DynamicSlotDataV2::key(PyObject *callback) // of them. If we used the callback itself instead of the code object, we would // create a new GlobalReceiverV2 for each in SignalManager::globalReceiver() // (signalmanager.cpp), leaking memory. + + // TODO: Need proper fix. This is temporary + if (std::strcmp(Py_TYPE(callback)->tp_name, "functools.partial") == 0) + return {nullptr, callback}; + return {nullptr, PyFunction_GetCode(callback)}; } |