From cd4a620d947800ecbd3b8c21d71c47a9fd766335 Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Wed, 25 Jul 2007 17:30:43 +0000 Subject: [PATCH] Prevent possible traceback --- src/chat_control.py | 2 ++ src/groupchat_control.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/chat_control.py b/src/chat_control.py index cb78a49ee..e27a64c92 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -1768,6 +1768,8 @@ class ChatControl(ChatControlBase): if not c.resource: return if target_type == self.TARGET_TYPE_URI_LIST: + if not selection.data: + return uri = selection.data.strip() uri_splitted = uri.split() # we may have more than one file dropped for uri in uri_splitted: diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 1d3dcdc85..1315f1442 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1658,6 +1658,8 @@ class GroupchatControl(ChatControlBase): # Invite contact to groupchat treeview = gajim.interface.roster.tree model = treeview.get_model() + if not selection.data: + return data = selection.data path = treeview.get_selection().get_selected_rows()[1][0] iter = model.get_iter(path)