[GTKUI] Fix unselect error with treeview selection returning None

In standalone mode treeview.get_selection returns None resulting
in an AttributeError for call to unselect_all.
This commit is contained in:
Calum Lind 2015-11-15 13:16:09 +00:00
parent fc9bc2976f
commit c62c604418
1 changed files with 2 additions and 1 deletions

View File

@ -349,6 +349,7 @@ class TorrentView(ListView, component.Component):
def stop(self):
"""Stops the torrentview"""
# We need to clear the liststore
if self.treeview.get_selection():
self.treeview.get_selection().unselect_all()
self.liststore.clear()
self.prev_status = {}