diff --git a/gui.py b/gui.py index 1042b82..a9a3840 100755 --- a/gui.py +++ b/gui.py @@ -339,11 +339,11 @@ class DocumentWindow(QMainWindow): def menuFileSaveAction(self): self.updateDocument() - fileExt = os.path.splitext(self.currentFilePath)[1].lower() - - if self.currentFilePath and fileExt != ".cma": - # Chordsheet Macro files can't be saved at this time - self.saveFile(self.currentFilePath) + if self.currentFilePath: + fileExt = os.path.splitext(self.currentFilePath)[1].lower() + if fileExt != ".cma": + # Chordsheet Macro files can't be saved at this time + self.saveFile(self.currentFilePath) else: filePath = QFileDialog.getSaveFileName(self.window.tabWidget, 'Save file', self.getPath( "workingPath"), "Chordsheet ML files (*.xml *.cml)")[0]