#3305: self->stream can be NULL.

This commit is contained in:
Georg Brandl 2008-07-16 22:04:20 +00:00
parent 86cbf81b47
commit b9b68ae7a5
2 changed files with 11 additions and 2 deletions

View file

@ -1484,7 +1484,7 @@ mbstreamreader_dealloc(MultibyteStreamReaderObject *self)
{
PyObject_GC_UnTrack(self);
ERROR_DECREF(self->errors);
Py_DECREF(self->stream);
Py_XDECREF(self->stream);
Py_TYPE(self)->tp_free(self);
}
@ -1686,7 +1686,7 @@ mbstreamwriter_dealloc(MultibyteStreamWriterObject *self)
{
PyObject_GC_UnTrack(self);
ERROR_DECREF(self->errors);
Py_DECREF(self->stream);
Py_XDECREF(self->stream);
Py_TYPE(self)->tp_free(self);
}