From 40c7ee9df911c98474b80a3030bc50bceba95d2c Mon Sep 17 00:00:00 2001 From: Gared Date: Sat, 27 Dec 2014 14:26:05 +0100 Subject: [PATCH] Prevent server crash if author is not set --- src/node/handler/PadMessageHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index bc8f5d629..7cdefc65c 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -1020,7 +1020,7 @@ function handleClientReady(client, message) { authorManager.getAuthor(authorId, function(err, author) { - if(ERR(err, callback)) return; + if(ERR(err, callback) || !author) return; historicalAuthorData[authorId] = {name: author.name, colorId: author.colorId}; // Filter author attribs (e.g. don't send author's pads to all clients) callback(); });