From 4b8cc05938cf1702be4583fe88afa94fbb16d4b4 Mon Sep 17 00:00:00 2001 From: Imayhaveborkedit Date: Wed, 20 Sep 2023 17:13:50 -0400 Subject: [PATCH] Fix possible FFmpegAudio AttributeError in __del__ --- discord/player.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/player.py b/discord/player.py index 83a8a5e89..9e4f80948 100644 --- a/discord/player.py +++ b/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