aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/libpyside/pysideproperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/libpyside/pysideproperty.cpp')
-rw-r--r--sources/pyside2/libpyside/pysideproperty.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
index d9d15eb3b..009a17a3e 100644
--- a/sources/pyside2/libpyside/pysideproperty.cpp
+++ b/sources/pyside2/libpyside/pysideproperty.cpp
@@ -210,6 +210,11 @@ int qpropertyTpInit(PyObject *self, PyObject *args, PyObject *kwds)
void qpropertyDeAlloc(PyObject *self)
{
qpropertyClear(self);
+ if (PepRuntime_38_flag) {
+ // PYSIDE-939: Handling references correctly.
+ // This was not needed before Python 3.8 (Python issue 35810)
+ Py_DECREF(Py_TYPE(self));
+ }
Py_TYPE(self)->tp_free(self);
}