Clicks in empty message shouldn't produce an error

This commit is contained in:
mailchuck 2016-01-10 17:46:22 +01:00 committed by Peter Surda
parent 46494dc3e6
commit b699475906
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class MessageView(QtGui.QTextBrowser):
def mousePressEvent(self, event):
#text = textCursor.block().text()
if event.button() == QtCore.Qt.LeftButton and self.html.has_html and self.cursorForPosition(event.pos()).block().blockNumber() == 0:
if event.button() == QtCore.Qt.LeftButton and self.html and self.html.has_html and self.cursorForPosition(event.pos()).block().blockNumber() == 0:
if self.mode == MessageView.MODE_PLAIN:
self.showHTML()
else: