summaryrefslogtreecommitdiff
path: root/alot/widgets/search.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/widgets/search.py')
-rw-r--r--alot/widgets/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/widgets/search.py b/alot/widgets/search.py
index 40fe7707..70c0064a 100644
--- a/alot/widgets/search.py
+++ b/alot/widgets/search.py
@@ -54,7 +54,8 @@ class ThreadlineWidget(urwid.AttrMap):
datestring = ''
if self.thread:
newest = self.thread.get_newest_date()
- datestring = settings.represent_datetime(newest)
+ if newest != None:
+ datestring = settings.represent_datetime(newest)
datestring = pad(datestring)
width = len(datestring)
part = AttrFlipWidget(urwid.Text(datestring), struct['date'])