aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-03-28 09:40:39 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-03-28 20:26:10 +0200
commit370e5c712cafb1ff3ca22cc1f9794904f6d7a14a (patch)
tree1290f3f65ab47ef8aa0b67f26f0c9a831eec5995 /sources/pyside6
parent192909a77f9c8caa4cd6d24987761fbca7ea199e (diff)
Fix endless recursion querying __doc__ of a property
Add a check for None Pick-to: 6.2 5.15 Fixes: PYSIDE-1874 Change-Id: I0127ba77ef2017dae232f2a1db1410d9cfe62405 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/libpyside/pysideproperty.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside6/libpyside/pysideproperty.cpp b/sources/pyside6/libpyside/pysideproperty.cpp
index b7fd55d24..5e68253d8 100644
--- a/sources/pyside6/libpyside/pysideproperty.cpp
+++ b/sources/pyside6/libpyside/pysideproperty.cpp
@@ -391,7 +391,7 @@ static PyObject *qPropertyDocGet(PyObject *self, void *)
if (pData->fget != nullptr) {
// PYSIDE-1019: Fetch the default `__doc__` from fget. We do it late.
AutoDecRef get_doc(PyObject_GetAttr(pData->fget, PyMagicName::doc()));
- if (!get_doc.isNull()) {
+ if (!get_doc.isNull() && get_doc.object() != Py_None) {
pData->doc = String::toCString(get_doc);
pData->getter_doc = true;
if (Py_TYPE(self) == PySideProperty_TypeF())