apply patch per PR feedback to avoid segfault (fixes olivierkes#950)

This commit is contained in:
Jonathan Pietkiewicz 2022-02-09 22:09:42 -06:00
parent 5a6d68e139
commit 750b96e18e
2 changed files with 6 additions and 6 deletions

View file

@ -63,6 +63,6 @@ def loadProject(project):
LOGGER.info("Detected file format version: {}. Zip: {}.".format(version, isZip))
if version == 0:
v0.loadProject(project)
return v0.loadProject(project)
else:
v1.loadProject(project, zip=isZip)
return v1.loadProject(project, zip=isZip)

View file

@ -430,13 +430,13 @@ def saveProject(zip=None):
filesWithPermissionErrors.append(project)
if len(filesWithPermissionErrors) > 0:
dlg = ListDialog()
dlg = ListDialog(mw)
dlg.setModal(True)
dlg.setWindowTitle(dlg.tr("Files not saved"))
dlg.label.setText(dlg.tr("The following files were not saved and appear to be open in another program"))
for f in filesWithPermissionErrors:
QListWidgetItem(f, dlg.listWidget)
dlg.exec()
dlg.open()
if project in filesWithPermissionErrors:
return False
@ -920,13 +920,13 @@ def loadProject(project, zip=None):
mdl.rootItem.checkIDs()
if len(filesWithPermissionErrors) > 0:
dlg = ListDialog()
dlg = ListDialog(mw)
dlg.setModal(True)
dlg.setWindowTitle(dlg.tr("Files not loaded"))
dlg.label.setText(dlg.tr("The following files were not loaded and appear to be open in another program"))
for f in filesWithPermissionErrors:
QListWidgetItem(f, dlg.listWidget)
dlg.exec()
dlg.open()
return errors