From 40c7ee9df911c98474b80a3030bc50bceba95d2c Mon Sep 17 00:00:00 2001 From: Gared Date: Sat, 27 Dec 2014 14:26:05 +0100 Subject: Prevent server crash if author is not set --- src/node/handler/PadMessageHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/node/handler/PadMessageHandler.js') diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index bc8f5d62..7cdefc65 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(); }); -- cgit v1.2.3