From 994f82f2dd10691470d2d47246093931a67ca9b2 Mon Sep 17 00:00:00 2001 From: Vincent Texier <vit@free.fr> Date: Sun, 29 Mar 2015 13:13:22 +0200 Subject: [PATCH] Catch exception NoneType error in refresh_person --- src/cutecoin/gui/community_tab.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cutecoin/gui/community_tab.py b/src/cutecoin/gui/community_tab.py index f54c835c..85ab4f7d 100644 --- a/src/cutecoin/gui/community_tab.py +++ b/src/cutecoin/gui/community_tab.py @@ -198,5 +198,8 @@ The process to join back the community later will have to be done again.""" QMessageBox.Ok) def refresh_person(self, pubkey): - index = self.table_community_members.model().sourceModel().person_index(pubkey) - self.table_community_members.model().sourceModel().dataChanged.emit(index[0], index[1]) + if self is None: + logging.error("community_tab self is None in refresh_person. Watcher connected to a destroyed tab") + else: + index = self.table_community_members.model().sourceModel().person_index(pubkey) + self.table_community_members.model().sourceModel().dataChanged.emit(index[0], index[1]) -- GitLab