From 65c5332eed22eb5c10be24a0724015617367333d Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:06:32 +0700 Subject: [PATCH] fix: TypeError: Cannot read properties of null (reading 'pid') --- src/client/voice/dispatcher/BaseDispatcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/voice/dispatcher/BaseDispatcher.js b/src/client/voice/dispatcher/BaseDispatcher.js index d043176..f1b8bb3 100644 --- a/src/client/voice/dispatcher/BaseDispatcher.js +++ b/src/client/voice/dispatcher/BaseDispatcher.js @@ -137,7 +137,7 @@ class BaseDispatcher extends Writable { if (this.player.dispatcher === this) this.player.dispatcher = null; const { streams } = this; if (streams.opus) streams.opus.destroy(); - if (streams.ffmpeg) { + if (streams.ffmpeg?.process) { const ffmpegPid = streams.ffmpeg.process.pid; // But it is ppid ;-; const args = streams.ffmpeg.process.spawnargs.slice(1).join(' '); // Skip ffmpeg find('name', 'ffmpeg', true).then(list => {