Browse Source

Fix possible FFmpegAudio AttributeError in __del__

pull/10109/head
Imayhaveborkedit 2 years ago
committed by dolfies
parent
commit
4b8cc05938
  1. 3
      discord/player.py

3
discord/player.py

@ -212,7 +212,8 @@ class FFmpegAudio(AudioSource):
return process
def _kill_process(self) -> None:
proc = self._process
# this function gets called in __del__ so instance attributes might not even exist
proc = getattr(self, '_process', MISSING)
if proc is MISSING:
return

Loading…
Cancel
Save