From 9d9b5e4f6897b68ba42e0db6d316474a2451df87 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Mon, 24 Apr 2017 20:05:24 +0300 Subject: [PATCH] Don't set initial room with an empty room list --- src/RoomList.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/RoomList.cc b/src/RoomList.cc index 8db1e7b2..4fbccee0 100644 --- a/src/RoomList.cc +++ b/src/RoomList.cc @@ -131,6 +131,9 @@ void RoomList::setInitialRooms(const Rooms &rooms) ui->scrollVerticalLayout->insertWidget(pos, room_item); } + if (rooms_.isEmpty()) + return; + // TODO: Move this into its own function. auto first_room = rooms_.first(); first_room->setPressedState(true);