From dacf3cfe864adca18253da24a9acd4d771bfd491 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 5cc8b133a..46705c5be 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