From 424540e57aeb19cf3ef0d91ed8d11e12271a011b Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 28 Dec 2015 02:40:17 +0000 Subject: [PATCH] fix NPE if messagePanel isn't yet defined --- src/components/structures/RoomView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 127fe2fdb8..56dd41d929 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -358,7 +358,9 @@ module.exports = React.createClass({ // pagination request, so give the messagePanel a chance to set off // another. - this.refs.messagePanel.checkFillState(); + if (this.refs.messagePanel) { + this.refs.messagePanel.checkFillState(); + } }, onSearchResultsFillRequest: function(backwards) {