crash fix

if composer is opened in a topic that was deleted/purged
This commit is contained in:
barisusakli
2014-09-01 17:24:18 -04:00
parent 43ca61de8c
commit 0b79a73732
2 changed files with 7 additions and 0 deletions

View File

@@ -71,6 +71,10 @@ SocketModules.composer.push = function(socket, pid, callback) {
return callback(err);
}
if (!results.topic) {
return callback(new Error('[[error:no-topic]]'));
}
callback(null, {
pid: pid,
body: postData.content,