From b699475906dea258e9646a784ada69cd73202c2e Mon Sep 17 00:00:00 2001 From: mailchuck Date: Sun, 10 Jan 2016 17:46:22 +0100 Subject: [PATCH] Clicks in empty message shouldn't produce an error --- src/bitmessageqt/messageview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bitmessageqt/messageview.py b/src/bitmessageqt/messageview.py index 9aa7ae54..36002710 100644 --- a/src/bitmessageqt/messageview.py +++ b/src/bitmessageqt/messageview.py @@ -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: