From 058d89cff659e7c0f9a0255a71154e484af91e28 Mon Sep 17 00:00:00 2001 From: "ivan@ivanholmes.co.uk" Date: Sun, 18 Apr 2021 21:15:41 +0100 Subject: [PATCH] actually fix --- gui.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gui.py b/gui.py index 70169da..a0b2736 100755 --- a/gui.py +++ b/gui.py @@ -509,12 +509,12 @@ class DocumentWindow(QMainWindow): self.window.chordTableView.populate(self.doc.chordList) # remove the chord if any of the blocks have it attached - for s in self.doc.sectionList: - for b in s.blockList: - if b.chord: - if b.chord.name == oldName: - b.chord = None - if self.currentSection.blockList is not None: + if self.currentSection is not None: + for s in self.doc.sectionList: + for b in s.blockList: + if b.chord: + if b.chord.name == oldName: + b.chord = None self.window.blockTableView.populate(self.currentSection.blockList) self.clearChordLineEdits() self.updateChordDict()