Skip to content

Commit 36fc1b0

Browse files
committed
Assign getter_doc only for non-null prop_doc
1 parent 4943868 commit 36fc1b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Objects/descrobject.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,9 @@ property_init_impl(propertyobject *self, PyObject *fget, PyObject *fset,
18051805
prop_doc = NULL;
18061806
Py_DECREF(Py_None);
18071807
}
1808-
self->getter_doc = 1;
1808+
if (prop_doc != NULL){
1809+
self->getter_doc = 1;
1810+
}
18091811
}
18101812

18111813
/* At this point `prop_doc` is either NULL or

0 commit comments

Comments
 (0)