[polari] roomList: Don't try to move selection when roomCount is zero
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] roomList: Don't try to move selection when roomCount is zero
- Date: Wed, 17 Sep 2014 02:50:05 +0000 (UTC)
commit cf6747420f67f9777eb3ba12cad91dc72b4e75ef
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Sep 17 04:35:07 2014 +0200
roomList: Don't try to move selection when roomCount is zero
There's nowhere to move in this case; fixes an exception when trying
to access activeRoom.id.
src/roomList.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index dfe2b68..71cc6ee 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -251,6 +251,9 @@ const RoomList = new Lang.Class({
},
_moveSelectionFromRow: function(row) {
+ if (this._roomManager.roomCount == 0)
+ return;
+
let activeRoom = this._roomManager.getActiveRoom();
let current = this._roomRows[activeRoom.id].widget;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]