diff --git a/src/history_window.py b/src/history_window.py
index 8c60aa5ef823216dd6acd8ed56afb09fae294918..c0f191c98147aa1dd701f582a1643d59722e85df 100644
--- a/src/history_window.py
+++ b/src/history_window.py
@@ -313,6 +313,8 @@ class HistoryWindow:
 		'''asks for days in this month if they have logs it bolds them (marks 
 		them)
 		'''
+		if not self.jid:
+			return
 		year, month, day = widget.get_date() # integers
 		# in gtk January is 1, in python January is 0,
 		# I want the second