Skip to content

Commit

Permalink
Merge pull request #82 from ssssam/sam/ffdec-crash-fix-3
Browse files Browse the repository at this point in the history
ffdec: Avoid AttributeError during destruction
  • Loading branch information
sampsyo committed Jan 12, 2019
2 parents 92f73b3 + d2e447a commit 1ab1fb5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions audioread/ffdec.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,10 @@ def close(self):

# Wait for the stream-reading threads to exit. (They need to
# stop reading before we can close the streams.)
self.stderr_reader.join()
self.stdout_reader.join()
if hasattr(self, 'stderr_reader'):
self.stderr_reader.join()
if hasattr(self, 'stdout_reader'):
self.stdout_reader.join()

# Close the stdout and stderr streams that were opened by Popen,
# which should occur regardless of if the process terminated
Expand Down

0 comments on commit 1ab1fb5

Please sign in to comment.