From 59dd7332192b36d1a6537e6a51b7ecc128ce2c30 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sat, 2 Aug 2014 19:15:49 -0700 Subject: [PATCH] Fix null reference bug --- lib/channel/playlist.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/channel/playlist.js b/lib/channel/playlist.js index ad83420d..3b8e1470 100644 --- a/lib/channel/playlist.js +++ b/lib/channel/playlist.js @@ -987,6 +987,10 @@ PlaylistModule.prototype.startPlayback = function (time) { * Its purpose is to allow modification of playback data before * users are sent a changeMedia */ + if (!self.current || !self.current.media) { + return; + } + self.sendChangeMedia(self.channel.users); self.channel.notifyModules("onMediaChange", [self.current.media]); }