Philipp Hörist pushed to branch master at gajim / gajim

Commits:

1 changed file:

Changes:

  • gajim/chat_control.py
    ... ... @@ -1180,7 +1180,10 @@ class ChatControl(ChatControlBase):
    1180 1180
                 treeview = app.interface.roster.tree
    
    1181 1181
                 model = treeview.get_model()
    
    1182 1182
                 data = selection.get_data().decode()
    
    1183
    -            path = treeview.get_selection().get_selected_rows()[1][0]
    
    1183
    +            tree_selection = treeview.get_selection()
    
    1184
    +            if tree_selection.count_selected_rows() == 0:
    
    1185
    +                return
    
    1186
    +            path = tree_selection.get_selected_rows()[1][0]
    
    1184 1187
                 iter_ = model.get_iter(path)
    
    1185 1188
                 type_ = model[iter_][2]
    
    1186 1189
                 if type_ != 'contact':  # Source is not a contact