Merge pull request #2400 from Gared/fix/author-not-set

Prevent server crash if author is not set
pull/2406/head
Stefan 2014-12-27 16:15:26 +01:00
commit a645aeef5c
1 changed files with 1 additions and 1 deletions

View File

@ -1020,7 +1020,7 @@ function handleClientReady(client, message)
{ {
authorManager.getAuthor(authorId, function(err, author) 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) historicalAuthorData[authorId] = {name: author.name, colorId: author.colorId}; // Filter author attribs (e.g. don't send author's pads to all clients)
callback(); callback();
}); });