diff options
Diffstat (limited to 'cura/Backups/BackupsManager.py')
-rw-r--r-- | cura/Backups/BackupsManager.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cura/Backups/BackupsManager.py b/cura/Backups/BackupsManager.py index 91ee578941..ba6fcab8d7 100644 --- a/cura/Backups/BackupsManager.py +++ b/cura/Backups/BackupsManager.py @@ -51,8 +51,18 @@ class BackupsManager: ## Here we try to disable the auto-save plug-in as it might interfere with # restoring a back-up. def _disableAutoSave(self) -> None: - self._application.getAutoSave().setEnabled(False) + auto_save = self._application.getAutoSave() + # The auto save is only not created if the application has not yet started. + if auto_save: + auto_save.setEnabled(False) + else: + Logger.log("e", "Unable to disable the autosave as application init has not been completed") ## Re-enable auto-save after we're done. def _enableAutoSave(self) -> None: - self._application.getAutoSave().setEnabled(True) + auto_save = self._application.getAutoSave() + # The auto save is only not created if the application has not yet started. + if auto_save: + auto_save.setEnabled(True) + else: + Logger.log("e", "Unable to enable the autosave as application init has not been completed") |