From 5bdcb64464f3e1052feed060cb7fbadf374e3dfc Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 21 Mar 2016 00:51:45 +0000 Subject: [PATCH] fix NPE --- src/components/views/rooms/RoomHeader.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js index b64cfc69cc..9a132a73f5 100644 --- a/src/components/views/rooms/RoomHeader.js +++ b/src/components/views/rooms/RoomHeader.js @@ -64,6 +64,8 @@ module.exports = React.createClass({ }, _recalculateState: function() { + if (!this.props.room) return; + var topic = this.props.room.currentState.getStateEvents('m.room.topic', ''); var name = this.props.room.currentState.getStateEvents('m.room.name', '');