[polari/wip/raresv/popoverRebasedOnTracker] userTracker: Fix exceptions when leaving room



commit 5e339f96948f8c497ba385c6f73e04e055066fff
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Jul 26 22:56:17 2016 +0200

    userTracker: Fix exceptions when leaving room
    
    When we only guard signal disconnections with the test for the right
    account, we end up trying to clear out room data from accounts that
    are not tracking that room ...

 src/userTracker.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/userTracker.js b/src/userTracker.js
index 0ff6757..87a5984 100644
--- a/src/userTracker.js
+++ b/src/userTracker.js
@@ -122,9 +122,10 @@ const UserTracker = new Lang.Class({
     },
 
     _onRoomRemoved: function(roomManager, room) {
-        if (room.account == this._account)
-            this._disconnectRoomSignalsForRoom(room);
+        if (room.account != this._account)
+            return;
 
+        this._disconnectRoomSignalsForRoom(room);
         this._clearUsersFromRoom(room);
     },
 


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