From 6852a15cee416d0c6c8558161006fbe76fcc8243 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 13 Aug 2018 17:54:11 +0100 Subject: [PATCH] voice: fix StreamDispatcher#pause trying to call null function --- src/client/voice/dispatcher/StreamDispatcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index 748e4f3f8..e79531b02 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -123,7 +123,7 @@ class StreamDispatcher extends Writable { pause() { if (this.paused) return; if (this.streams.opus) this.streams.opus.unpipe(this); - this._writeCallback(); + if (this._writeCallback) this._writeCallback(); this._setSpeaking(false); this.pausedSince = Date.now(); }