diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index 6d8d63d00..16e2d5e12 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -31,8 +31,13 @@ def str_nocase_sort(model, iter1, iter2, data): Sort string column data with locale.strcoll which (allegedly) uses ISO 14651. """ - v1 = model[iter1][data].lower() - v2 = model[iter2][data].lower() + try: + v1 = model[iter1][data].lower() + v2 = model[iter2][data].lower() + except AttributeError: + # Catch None type for value. + v1 = model[iter1][data] + v2 = model[iter2][data] return strcoll(v1, v2)