Skip to content

Commit a2cdd0b

Browse files
ax3lwjakob
authored andcommitted
dict_readonly: member init (#1661)
fix missing member initialization in pytypes: read-only dict. Found with coverity in a downstream project.
1 parent 1c627c9 commit a2cdd0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/pybind11/pytypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ class dict_readonly {
708708

709709
private:
710710
handle obj;
711-
PyObject *key, *value;
711+
PyObject *key = nullptr, *value = nullptr;
712712
ssize_t pos = -1;
713713
};
714714
NAMESPACE_END(iterator_policies)

0 commit comments

Comments
 (0)