From 6a8c6cad65561ce034c8a3e83251d090ef01b64c Mon Sep 17 00:00:00 2001
From: Denis Fomin <fominde@gmail.com>
Date: Mon, 17 Oct 2011 20:13:08 +0300
Subject: [PATCH] now_listen. correct disconnecting from chat control

---
 now_listen/now_listen.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/now_listen/now_listen.py b/now_listen/now_listen.py
index d7c4b716..0a294277 100644
--- a/now_listen/now_listen.py
+++ b/now_listen/now_listen.py
@@ -95,6 +95,8 @@ class Base(object):
         self.chat_control.handlers[self.id_] = self.chat_control.msg_textview
 
     def disconnect_from_chat_control(self):
+        if self.id_ not in self.chat_control.handlers:
+            return
         if self.chat_control.handlers[self.id_].handler_is_connected(self.id_):
             self.chat_control.handlers[self.id_].disconnect(self.id_)
             del self.chat_control.handlers[self.id_]
-- 
GitLab