Skip to content

Commit

Permalink
Fix segmentation fault when taking str() of closed file
Browse files Browse the repository at this point in the history
closes #242
  • Loading branch information
dralley authored and kontura committed Feb 22, 2021
1 parent 2e44b73 commit c752fc0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/python/xml_file-py.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ xmlfile_dealloc(_XmlFileObject *self)
static PyObject *
xmlfile_repr(_XmlFileObject *self)
{
if (check_XmlFileStatus(self)) {
return NULL;
}

char *type;

switch (self->xmlfile->type) {
Expand Down

0 comments on commit c752fc0

Please sign in to comment.