Prevent possible traceback

This commit is contained in:
Stephan Erb 2007-07-25 17:30:43 +00:00
parent fddc2e6aa9
commit cd4a620d94
2 changed files with 4 additions and 0 deletions

View File

@ -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:

View File

@ -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)