[polari] userList: Don't update header if no channel



commit bd836a4fde93d56b2f6de9df08ed6f4f8eeadf21
Author: Carlos Soriano <carlos soriano89 gmail com>
Date:   Fri Feb 28 13:58:52 2014 +0100

    userList: Don't update header if no channel
    
    Since we can have rooms without channel, trying to
    count the number of users if no channel is set for the
    room causes a warning.
    Just ignore the header if there's not channel for the room.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720706

 src/userList.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/userList.js b/src/userList.js
index 62e29e9..817f54f 100644
--- a/src/userList.js
+++ b/src/userList.js
@@ -426,6 +426,9 @@ const UserList = new Lang.Class({
         if (row.get_header())
             return;
 
+        if (!this._room.channel)
+            return;
+
         let members = this._room.channel.group_dup_members_contacts();
         let numMembers = members.length;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]