From 98571d706f16d36fd3402e765fd9c1b61c640824 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 27 Dec 2019 11:31:15 -0700 Subject: [PATCH] Fix NPE when searching for rooms Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/3751 --- src/components/views/rooms/RoomTile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index ecf2de394b..241713c97d 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -380,7 +380,8 @@ module.exports = createReactClass({ />; const { room } = this.props; - if (room.getMember(dmUserId).membership === "join" && room.getJoinedMemberCount() === 2) { + const member = room.getMember(dmUserId); + if (member && member.membership === "join" && room.getJoinedMemberCount() === 2) { const UserOnlineDot = sdk.getComponent('rooms.UserOnlineDot'); dmOnline = ; }