[polari] Don't crash when leaving a room without a channel



commit d96c6fbdb6b438b381e34bb64fb5c1cc7c579d96
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Mon Feb 24 15:10:18 2014 +0100

    Don't crash when leaving a room without a channel
    
    If the channel disappears, for example because we were disconnected
    and it was not restored, just remove the room from our data
    structures.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=725064

 src/application.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 033ac8c..bc2603d 100644
--- a/src/application.js
+++ b/src/application.js
@@ -375,7 +375,7 @@ const Application = new Lang.Class({
             return;
         if (this._pendingRequests[roomId]) {
             this._pendingRequests[roomId].cancellable.cancel();
-        } else {
+        } else if (room.channel) {
             if (!message.length)
                 message = _("Good Bye"); // TODO - our first setting?
             room.channel.leave_async(reason, message, Lang.bind(this,


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