[polari/wip/fmuellner/combined-gsoc: 124/136] userTracker: Fix exceptions when leaving room



commit 70dbdd6e204c2a0bf1fd59a680bff947d4e5feb5
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]