summary refs log tree commit diff
path: root/src/RoomList.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-24 20:05:24 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-04-24 20:05:24 +0300
commit9d9b5e4f6897b68ba42e0db6d316474a2451df87 (patch)
treeff1e27b87bf61efb43c1156f03bf9ca7d4901e4b /src/RoomList.cc
parentAdd common style for the scroll bars (diff)
downloadnheko-9d9b5e4f6897b68ba42e0db6d316474a2451df87.tar.xz
Don't set initial room with an empty room list
Diffstat (limited to '')
-rw-r--r--src/RoomList.cc3
1 files changed, 3 insertions, 0 deletions
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);