diff --git a/src/rooms/ExploreComponent.qml b/src/rooms/ExploreComponent.qml index ce7d754db..67f09e2ad 100644 --- a/src/rooms/ExploreComponent.qml +++ b/src/rooms/ExploreComponent.qml @@ -15,6 +15,7 @@ import org.kde.neochat RowLayout { id: root + required property NeoChatConnection connection property bool collapsed: false signal search @@ -36,7 +37,7 @@ RowLayout { } else if(RoomManager.currentSpace === 'DM') { return i18nc("@title", "Direct Messages"); } - return root.connection.room(RoomManager.currentSpace).displayName; + return root.connection.room(RoomManager.currentSpace)?.displayName; } return i18nc("@title List of rooms", "Rooms"); } diff --git a/src/rooms/RoomListPage.qml b/src/rooms/RoomListPage.qml index 7a7a30901..190ee996e 100644 --- a/src/rooms/RoomListPage.qml +++ b/src/rooms/RoomListPage.qml @@ -270,6 +270,7 @@ Kirigami.Page { Component { id: exploreComponent ExploreComponent { + connection: root.connection collapsed: root.collapsed onSearch: root.search()