From 9a0c1c27edb2bcd0ab8e6fb4b59039c66218b935 Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Tue, 10 Aug 2021 22:16:27 -0400 Subject: Remove warnings on closing room --- resources/qml/RoomList.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'resources/qml/RoomList.qml') diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml index 66cbac5a..576383e2 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml @@ -33,7 +33,8 @@ Page { Connections { function onCurrentRoomChanged() { - roomlist.positionViewAtIndex(Rooms.roomidToIndex(Rooms.currentRoom.roomId), ListView.Contain); + if (Rooms.currentRoom) + roomlist.positionViewAtIndex(Rooms.roomidToIndex(Rooms.currentRoom.roomId), ListView.Contain); } target: Rooms -- cgit 1.4.1