Skip to content

Commit

Permalink
BUG: prevent QHull message stream being closed twice (#20611)
Browse files Browse the repository at this point in the history
  • Loading branch information
andfoy committed May 3, 2024
1 parent c100886 commit d0ad5aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scipy/spatial/_qhull.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ cdef class _Qhull:
"qhull: did not free %d bytes (%d pieces)" %
(totlong, curlong))

self._messages.close()
if self._messages is not None:
self._messages.close()

@cython.final
def close(self):
Expand All @@ -387,7 +388,8 @@ cdef class _Qhull:
"qhull: did not free %d bytes (%d pieces)" %
(totlong, curlong))

self._messages.close()
if self._messages is not None:
self._messages.close()

@cython.final
def get_points(self):
Expand Down

0 comments on commit d0ad5aa

Please sign in to comment.