Fix crash if Cheatsheet filter term not found and Enter key pressed #354

See issue #354.
This commit is contained in:
Curtis Gedak 2018-08-13 12:55:45 -06:00
parent 0d84202da6
commit 713528a239

View file

@ -146,10 +146,11 @@ class cheatSheet(QWidget, Ui_cheatSheet):
def showInfos(self):
self.hideList()
i = self.list.currentItem()
ref = i.data(Qt.UserRole)
if ref:
self.view.setText(Ref.infos(ref))
if self.list:
i = self.list.currentItem()
ref = i.data(Qt.UserRole)
if ref:
self.view.setText(Ref.infos(ref))
def openLink(self, link):
Ref.open(link)