From 3a6f667008d0bb53fa7b1c69cb2a11399e9b98dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 7 Jul 2018 20:01:47 +0200 Subject: [PATCH] Check if we have a nbxmpp Client object In some cases the XMPPDispatcher which handles the callbacks is not yet created. --- gajim/common/connection_handlers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gajim/common/connection_handlers.py b/gajim/common/connection_handlers.py index c70211e47..c670eb919 100644 --- a/gajim/common/connection_handlers.py +++ b/gajim/common/connection_handlers.py @@ -1446,5 +1446,7 @@ ConnectionHandlersBase, ConnectionJingle, ConnectionIBBytestream): con.RegisterHandler(*handler) def _unregister_handlers(self): + if not self.connection: + return for handler in modules.get_handlers(self): self.connection.UnregisterHandler(*handler)