From 12dab2a64a374b1b30f33f41fae2af5fa33be741 Mon Sep 17 00:00:00 2001 From: Ivan Holmes Date: Thu, 31 Oct 2019 16:19:39 +0000 Subject: [PATCH] fixed crash reading block without chord attached --- chordsheet/tableView.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chordsheet/tableView.py b/chordsheet/tableView.py index 1e1afd7..0d4a7f3 100644 --- a/chordsheet/tableView.py +++ b/chordsheet/tableView.py @@ -70,7 +70,7 @@ class BlockTableView(MTableView): def populate(self, bList): self.model.removeRows(0, self.model.rowCount()) for b in bList: - rowList = [QtGui.QStandardItem(b.chord.name), QtGui.QStandardItem(str(b.length)), QtGui.QStandardItem(b.notes)] + rowList = [QtGui.QStandardItem((b.chord.name if b.chord else "")), QtGui.QStandardItem(str(b.length)), QtGui.QStandardItem(b.notes)] for item in rowList: item.setEditable(False) item.setDropEnabled(False)