[polari/wip/fmuellner/combined-gsoc: 123/137] userTracker: Fix exceptions when leaving room
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/combined-gsoc: 123/137] userTracker: Fix exceptions when leaving room
- Date: Thu, 28 Jul 2016 16:25:47 +0000 (UTC)
commit 360b95ec3336d06332e64939d6da1cd0bbb4b63e
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]